sgen

SGEN doesn't work after upgrading from VS2008 to VS2010

守給你的承諾、 提交于 2019-11-28 07:57:13
问题 I just recently upgraded a VS2008/.NET 3.5 SP1 project to VS2010 and .NET 4. I have a post-build event which calls SGEN to generate the XmlSerializers assembly. Whenever I try to run it I get the following error. "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\sgen.exe" /debug /force /verbose /c:"platform:x86" "C:\path\to\SomeAssembly.dll" Microsoft (R) Xml Serialization support utility [Microsoft (R) .NET Framework, Version 2.0.50727.3038] Copyright (C) Microsoft Corporation. All rights

Mixed mode assembly is built against version X and cannot be loaded in version Y of the runtime without additional configuration information

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 04:09:15
问题 After doing some code refactoring, my VS2010 VB.Net Web Application project has stopped compiling with the following error: "Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information." In the 'File' column of the Visual Studio's error list is the word 'SGEN', but when I double-click, the file does not exist ("The document cannot be opened. It has been renamed, deleted or moved.") I gather it has

VSTS 2010 SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x80131515)

喜欢而已 提交于 2019-11-28 03:21:48
I am experiencing a strange issue with VS2010. We use TFS to build our API dlls and we used to reference them in our projects usign a mapped network drive that was fully trusted. We have been working like that for at least two years and everything worked perfectly. Today, I converted a webapp to vs2010 and when I compile it in Release, it's giving me: SGEN : error : Could not load file or assembly 'file:///L:\Api\Release API_20100521.1\Release\CS.API.Exceptions.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) The strange thing is that it's

Precompile XmlSerializers with XmlAttributeOverrides

試著忘記壹切 提交于 2019-11-28 00:02:06
When constructing XmlSerializer instances in .NET, assemblies for serializing and deserializing the specified type are generated dynamically. This is a time-consuming process. The sgen.exe tool from Microsoft can be used to precompile XmlSerializer instances to use them later without generating them dynamically. Unfortunately this is not possible with XmlSerializer instances which use XmlAttributeOverrides. Is there any way to precompile these XmlSerializer instances to avoid generation at run-time? Andreas, this is not a problem of the sgen tool itself, this is due to the XmlSerializer

VSTS 2010 SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x80131515)

房东的猫 提交于 2019-11-27 05:06:43
问题 I am experiencing a strange issue with VS2010. We use TFS to build our API dlls and we used to reference them in our projects usign a mapped network drive that was fully trusted. We have been working like that for at least two years and everything worked perfectly. Today, I converted a webapp to vs2010 and when I compile it in Release, it's giving me: SGEN : error : Could not load file or assembly 'file:///L:\Api\Release API_20100521.1\Release\CS.API.Exceptions.dll' or one of its dependencies

How to set SGEN toolpath in Msbuild to target 3.5 framework

岁酱吖の 提交于 2019-11-27 01:44:53
I've just upgraded a project from VS2008 to VS2010 but I'm still targeting the 3.5 framework. In my project file I have a custom task to run SGEN to generate my XmlSerializers.dll. However the version of sgen being run targets the 4.0 framework. As a result, when I run my application I get the error message: "Could not load file or assembly 'XXXX.XXXX.XmlSerializers' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded." The Sgen task looks like this: <Target Name="AfterBuild" DependsOnTargets="AssignTargetPaths;Compile

Precompile XmlSerializers with XmlAttributeOverrides

爱⌒轻易说出口 提交于 2019-11-26 21:36:43
问题 When constructing XmlSerializer instances in .NET, assemblies for serializing and deserializing the specified type are generated dynamically. This is a time-consuming process. The sgen.exe tool from Microsoft can be used to precompile XmlSerializer instances to use them later without generating them dynamically. Unfortunately this is not possible with XmlSerializer instances which use XmlAttributeOverrides. Is there any way to precompile these XmlSerializer instances to avoid generation at

How to set SGEN toolpath in Msbuild to target 3.5 framework

北慕城南 提交于 2019-11-26 09:45:29
问题 I\'ve just upgraded a project from VS2008 to VS2010 but I\'m still targeting the 3.5 framework. In my project file I have a custom task to run SGEN to generate my XmlSerializers.dll. However the version of sgen being run targets the 4.0 framework. As a result, when I run my application I get the error message: \"Could not load file or assembly \'XXXX.XXXX.XmlSerializers\' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be