Can't create MVC4 projects after compiling Nuget Version

Topics: Ecosystem
Dec 20, 2012 at 8:19 PM

When I try to create a project from MVC template I get the following error "Error: this template attempted to load component assembly 'NuGet.VisualStudio.Interop, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.".
I compiled our version of NuGet but there weren't any code modifications. 
The organization is not opened for the internet.
Do you know this error or has any idea how to solve it? 

Dec 21, 2012 at 7:59 AM

Yup, when you build from the NuGet solution, the assembly is not signed. The MVC template looks for the signed assembly.

Dec 21, 2012 at 2:55 PM

It means you can't build your own solution! Isn't is suppose to be an open source project?
If I would sign the assembly with my snk would it  be ok or does it look for your specific signature?

Dec 22, 2012 at 7:15 AM

Please response... We put a lot of effort to learn the code and modify it...
Does it mean you can't really use your own build as VS will not open MVC projects anymore? 

Dec 24, 2012 at 1:29 PM
Edited Dec 24, 2012 at 1:31 PM

ASP.NET MVC is also open source, so you might just be able to compile it against your version of NuGet.  I don't see the templates in the source code on though, so that might not currently be a possibility.

The other option is to delay-sign your NuGet assemblies with the same key, and then disable strong name verification for that key.  To do this, follow the steps described here:  Note in this case you will need to disable strong name verification for the NuGet key, where in the linked case it turned out not to be necessary.

You also might ask the ASP.NET team about this, they may be able to provide a better answer.

Also, I think you will only get this error when creating MVC projects.  If you open an existing MVC project with your own version of NuGet installed I think everything will work OK.