Reputation: 22904
I just ported my MVC application to Azure, added it as a web role, but cannot package the Azure project.
It complains about missing assemblies from a workflow project in my solution located in a Solution Folder:
Application (Solution)
| Application.Workflows (Solution Folder)
| Application.Workflows.Registration (Workflow Project)
| Application.Azure (Cloud Service Project)
| Application.Web (MVC project)
After first making sure the relevant assemblies have Copy Local
set to true
I dug deeper to find that I cannot build Application.Workflows.Registration
project in Release mode, which is the mode I attempt to package the solution in. (Debug builds works fine.)
Warning Could not resolve this reference. Could not locate the assembly "Application.DataAccess" (SAME FOR Application.EntityModel). Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
That warning leads to slew of error of this type:
Error The type or namespace name 'DataAccess' does not exist in the namespace 'Application' (are you missing an assembly reference?) C:\Source Control\Application\Application.Workflows.Registration\Membership.cs
Again, the solution builds fine in debug, I looked at Confirguration Manager and debug/release configurations are identical
Upvotes: 0
Views: 282
Reputation: 22904
Ok I resolved this.
The two assemblies it was complaining about were being referenced from bin/Debug even for the release build. I had to re-add the two assemblies with "Release" configuration selected in order for them to be referenced from bin/Release
Upvotes: 1