I have a project copied from different PC to a new PC. The project was built in VS2005 with .NET 2.0. I open this project in VS2008 and VS2010, rebuilding the project in DEBUG mode works, but does not work when Release-NonAuthorization mode is selected.
The error is below. I also tried running this project in VS2005 on a different PC, but the result is the same, error.
I've googled for this error and tried the suggestions that are given by others, but it doesn't resolve the problem. One of the suggestion partly work, which is, removing all the web service references. However, after I put the web service reference back,
the error comes back. Another suggestion points out that the ToolPath is looking at the wrong directory. However, I do not know where the ToolPath is.
Error Description: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
File: SGEN
Okay, I don't know what's going on then. =)
I compiled it on another VS2010 on a different XP and it works. Also compiled on two different Win7 PC with VS2010; result is the same as the other Win7 PC
WishStar99
Contributor
2857 Points
879 Posts
SGEN not found problem.
Mar 01, 2012 06:32 PM|LINK
Hi all,
I have a project copied from different PC to a new PC. The project was built in VS2005 with .NET 2.0. I open this project in VS2008 and VS2010, rebuilding the project in DEBUG mode works, but does not work when Release-NonAuthorization mode is selected. The error is below. I also tried running this project in VS2005 on a different PC, but the result is the same, error.
I've googled for this error and tried the suggestions that are given by others, but it doesn't resolve the problem. One of the suggestion partly work, which is, removing all the web service references. However, after I put the web service reference back, the error comes back. Another suggestion points out that the ToolPath is looking at the wrong directory. However, I do not know where the ToolPath is.
Error Description: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
File: SGEN
Any input is appreciated. Thanks.
WishStar99
Contributor
2857 Points
879 Posts
Re: SGEN not found problem.
Mar 01, 2012 09:23 PM|LINK
I tried on another machine with VS2005 running on WinXP. And it works!!!
Both machines that i tried on in my initial post have Win7. I think I know what's going on. Will post if I found the solution.
WishStar99
Contributor
2857 Points
879 Posts
Re: SGEN not found problem.
Mar 01, 2012 10:54 PM|LINK
Okay, I don't know what's going on then. =)
I compiled it on another VS2010 on a different XP and it works. Also compiled on two different Win7 PC with VS2010; result is the same as the other Win7 PC
Clue less.
Dino He - MS...
Star
8068 Points
1023 Posts
Microsoft
Re: SGEN not found problem.
Mar 05, 2012 01:05 AM|LINK
Hi
This problem occurs when sgen.exe is not able to get write access to your output assembly to generate serialization assembly.
Reason may be file is read only or it is on UNC path.
To resolve this issue you have following options.
Copy your solution to you system local drive then build your solution.
Use caspol.exe to grant full trust to the UNC path.
Disable Generate serialization assembly option from your project properties build tab.
For more info please visit http://bimbim.in/post/2010/09/06/SGEN-error-Could-not-load-file-or-assembly.aspx
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework