Xamarin Android project is built well locally on Windows/Mac, but fails on AppCenter/Azure pipelines with weird errors like:
Error APT0000: resource style/Theme.AppCompat.Light.DarkActionBar (aka com.companyname.build_testing_andx:style/Theme.AppCompat.Light.DarkActionBar) not found.
Error APT0000: style attribute 'attr/colorPrimary (aka com.companyname.build_testing_andx:attr/colorPrimary)' not found.
This mostly looks like lack of necessary libraries to restore by Nuget.
As it appeared after long investigation, and no matter how the solution sounds dumb, but the solution might save some time for someone.
The reason such projects can't be build on AppCenter/Azure (and that might be related to any other Visual Studio project) is that Nuget packages not being restored successfully.
The problem is that when using Nuget task, it doesn't indicate any issues. It just finishes well.
But it happens because the sources don't include *.sln file, thus Nuget doesn't have a point where to start from for the packages restoring.
Sometimes it might happen when this file is just not included into sources pushed to repository by number of reasons.
*(It's weird because the builds often project-oriented, and when working on Visual Studio it automatically creates the .sln file (not necessary around the project folder), so sometimes it might just be not included and you have no idea what's causing the errors above).
So, just to be sure you've got your *.sln file added to your repository and it's available for the AppCenter/Azure build.
I'm publishing my application to two separate IIS servers. The problem I have is when publishing to profile01 it builds the project and then publishes successfully. I then Publish again but switch to profile02. Upon doing this it builds the solution again (changing assembly version #) and publishes to the other server.
Now I have mismatched versions between server 01 and server02.
I'm assuming that when I change Profiles it makes a change somewhere to the project, once that change is made VS assumes a new build is required.
Any thoughts, suggestions, references would be greatly appreciated.
You can create a Web Deployment package & deploy this package to multiple servers. Documentation on how to create and deploy using the package is available here - https://msdn.microsoft.com/en-us/library/dd465323(v=vs.110).aspx
When I build my solution with a bunch of cloud projects, I see one or more "Error: Object reference not set to an instance of an object" messages in the output. When I try to run one of the cloud projects, I get the popup "There were build errors. Do you want to continue and run the last successful build", but there are no errors in the Error List and the same "Error: Object ref..." errors in the output.
When I click package on my cloud project I get a messagebox with "Object reference not set to an instance of an object", also when I right click -> properties on the project reference under "Roles" in the cloud project.
If I use the command line to build my solution with msbuild, I don't get the error.
I tried restarting Visual Studio as well as my PC. I also tried reinstalling Azure Tools (2.1) and then Visual Studio.
My colleague is now getting the same problem on Visual Studio 2013 RC.
Has anyone had the same problem?
I've searched, but only found people with problems when publishing, where the solution is to package manually.
I had the same problem. Right click on the cloud service project, unload the project. Reload it again.
Try removing the role from the cloud project, re-build solution (if there are errors please post them), then add the role back into the cloud project and re-build.
I had a similar issue when a publish exited out and I started receiving the 'Object not found' error. VS2013 (in my case) was reporting that 'diagnostics.wadcfg' was missing and had unusually stored this into a different directory.
By going into the project file (.ccproj) and removing the erroneous entry from the 'Project\ItemGroup\Content Include "\diagnostics.wadcfg" and reloading the project - everything kicked back into life.
Failing that, check a working project file against the offending project file for inconsistencies.
You don't have to remove your roles and add them back in again, which is really annoying because you have to preserve the contents of your cscfg and csdef files. Instead, close Visual Studio, delete the solution's .suo file and open the solution back up again.
I wanted to let everyone know I was dealing with a very similar situation, albeit with a different version of the Azure SDK (1.8). I have many projects with Cloud Services that I have created built numerous times and then all of sudden could no longer open them. Attempting to open the Cloud Service configuration UI resulted in the “Object not set to a reference” error. I could open the actual XML file, but not the GUI interface.
I attempted to reinstall the 1.8 SDK and tools numerous times, as well as VS 2012 to no avail. I finally tried installing the latest SDK (2.2) and now I can open the projects. Not sure what changed in my system prior to this but glad I was finally able to open my projects again!
I also had this error when building. Projects within the solution would build independently but building the entire solution failed.
I have learnt usually these types of issues are caused by invalid azure role or configuration files. In my case it turns out a .cscfg config file rename on another branch was merged with my branch but it didn't rename the file – therefore the .ccproj file in my branch was incorrectly referring to the new name but only the old filename existing in the solution. After manually editing the .ccproj with the new filename I closed/reopened the solution and things started working.
I had a similar issue with VS2013 express after creating a view in my MVC project.
I reverted the project with git, but this did not solve the issue. I also checked the project out to a different location on my pc, but this did not solve the issue. I was able to check the project out on my laptop without seeing this issue.
In the end, I undinstalled VS2013 express and all of it's counterparts and re-installed. This solved the issue.
I had this bug (but not using a cloud project). Turns out the character encoding that Perforce (P4V) was using was wrong, it should have been UTF-8. After changing to UTF-8 and re-syncing the code, Visual Studio was able to find and compile the project just fine.
Maybe a hint: I got the same error message, when compiling VS2013 Dot42 project - realized it was caused by assigning concrete value of some inner type (in my case Enum) to INullable variable:
private SomeClass.SomeEnum? _var1;
...
_var1 = SomeClass.SomeEnum.XY; // causes compilation error
The solution was, not to use INullable:
private SomeClass.SomeEnum _var1;
None of these answer helped me. I decided to reinstall the Azure tools, and noticed that I had more than one version installed. I uninstalled the old versions, reinstalled the latest version, and this fixed it for me.
I got the same message while publishing our project too, though in Visual Studio 2010.
For me, deleting all the files from bin folder worked.
I have a c# project, that is using nuget-packages, for instance "System.Data.SQLite".
When I build my solution, the project is built each time.
Looking into details, it turns out that the DLLs that belong to packages (that are located in
$(SolutionDir)\packages\$(PackageName)\
) will be renewed before each build, although there is no new version on the server. This results into this each-time-building.
How do I avoid this?
Upgraded nuget.exe to v2.7 solved the problem
Liteservandroid is an application that is used as Http api/Restful api to connect to CouchDB from TouchDB. I got a sample project and when i tried to build the project, i got the following error.
Gradle: A problem occurred configuring project ':LiteServAndroid'.
Failed to notify project evaluation listener.
Configuration with name 'default' not found.
There were no pointing errors in the code section. Can any one help me to find a solution.
Thanks
Chinna
The first hint I see with your problem is that in August 2013 you are talking about TouchDB - and TouchDB name change was introduced as far back as January 2013. There are old projects sitting out there using out of date code.
Are you sure you are using the newer code base? Here is the direct link to the ListServAndroid project https://github.com/couchbaselabs/LiteServAndroid
I found Couchbase Lite to be a bit tricky to integrate. They have moved it all over to Android Studio for building and developing too... so that might be new learning also. Have you gotten the GrocerySync test application working?