0x80131700 Build Error on .NET Micro Framework - visual-studio-2010

The following build error occurs when using .NET Micro Framework project, whether in emulator mode or not.
0x80131700
or
error MMP0000: 0x80131700

Solution by way of a drop-in file available on CodePlex (click here), also contains suggestions about frameworks.
Note: Ran into this problem during an electronics class, Googled the above answer, posting solution here for people to find, for archive and easy future reference.
Description
MetaDataProcessor fails with the above error during the build of .NET Micro Framework project on a computer where only .NET Framework 4.0 is installed (e.g. Visual Studio 2010 on a clean Windows XP Mode virtual machine). To workaround the issue copy the attached MetaDataProcessor.exe.config file into a directory where the .exe file is located (default %ProgramFiles%\Microsoft .NET Micro Framework\v4.1\Tools); alternatively install .NET Framework 2.0+ (3.5 SP1).
File Attachment - MetaDataProcessor.exe.config contents:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319"/>
</startup>
</configuration>

Related

.Net class library compilation error on build machine

I have a SDK styled .Net class library which compiles properly on my local machine, however fails on build server.
The contents of .csproj are
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net35;net40;netstandard1.0</TargetFrameworks>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<Version>1.5.6</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
</Project>
The error displayed is:
NETSDK1045: The current .NET SDK does not support targeting .NET Standard 4.0. Either target .NET Standard 2.1 or lower, or use a version of the .NET SDK that supports .NET Standard 4.0
I have .NET Core 3.1.113 installed on build server and .NET 5 installed on local machine.
Note: If I remove netstandard1.0 from TargetFrameworks then build succeeds on both the machines. However I want my library to target .net standard 1.0 as well.
I cannot understand why v4.0 is treated as .NET Standard 4.0 on build server. Can anyone let me know what the problem might be?
Remove the following line from your .csproj file:
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
This overrides the version value that the SDK infers from TargetFramework which will interfere with your definition of net3.5 and so on - you were actually building .NET Framework 4.0 twice and then override netstandard1.0 to .NET Standard (inferred TargetFrameworkIdentifier) to 4.0. Newer versions of the SDK may have different inference logic which may be a difference between 3.1 and 5.0 SDKs but this is an error in the csproj nonetheless.
If your build logic relies on TargetFrameworkVersion being defined in the project I suggest you try to change your build logic - this is VERY DANGEROUS to have in a modern csproj file where you rely on TargetFramework and TargetFrameworks (plural). You can also try to move it into a separate <PropertyGroup> with an always-fals-condition (e.g. <PropertyGroup Condition="'$(ThisIsToWorkAroundBuildScripts)' == 'True'">)
I cannot understand why v4.0 is treated as .NET Standard 4.0 on build
server. Can anyone let me know what the problem might be?
That is quite strange and I have not seen that issue before. And there is no info about .NET Standard 4.0 and I did not know why VS treats v4.0(net framework 4.0) as net standard 4.0. Maybe your there is some problems about your server environment.
Please follow these:
1) First, please use dotnet --list-sdks under CMD to check if you installed net core 2.1 sdk or any other versions. And actually, net core 2.1 sdk could support the previous sdks including net standard 1.0. Maybe you would better install net core 2.1 sdk. Also, you could install the latest Net Core 3.1 Sdk.
2) check system environment variable, and find whether there is a variable called MSBuildSDKsPath, if so, please delete it. Then, restart.
3) delete bin and obj folder under the build server. Also, I suggest you would better use Build Tool for VS to build your projects on the server rather than dotnet build. dotnet cli does not contain the tool for net framework. What's more, your project is multi-targetframeworks, it could build net core and net standard, and also you have to download net framework sdk.
That is too complex, you could install the Build Tool for VS2019(more likely a lightweight cmd which integrates dotnet, net framework, all vs environment). Also, install the Net desktop build tool and net core build tool workload, also install the related sdks.
When you finish it, delete bin and obj folder, type this under Build Tool for VS command:
msbuild xxx\xxx.csproj -t:clean,restore,build

Exception in executing publishing in VS2013

I have a asp.net web forms template with individual accounts without any modifications. When I try to publish this application to my web server I'm receiving the following error:
Exception in executing Publishing: Cannot load file or assembly 'Microsoft.VisualStudio.Web.Azure.Contracts, Version=2.0.0.0, Culture neutral, PublishKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Has anyone else ever received this error? I'm getting the error message after I right click on my project and select 'publish'. I've done some googling but haven't found any solutions.
I'm not sure if it matters, but the version of VS I'm using is Visual Studio Professional 2013 and my webforms project is .NET 4.5
Any help or direction would be appreciated. Thanks!
You need to install Windows Azure SDK for .NET (VS 2013) by following these steps:
Go to http://www.windowsazure.com/en-us/downloads and on click the
“VS 2013 Install” link under .NET category
Download and install the Windows Azure SDK installer which uses
Microsoft’s WPI (Web Platform Installer)
http://digital.voyage/2014/03/28/exception-in-executing-publishing-error-in-vs2013/

How do I fix my source code bindings?

I've installed VB6, I've installed Sourcegear Vault 5.x and now I get this message on every VB6 startup.
And of course, I can't use the built-in source control commands.
I've tried reinstalling SourceGear Vault, to no avail. What am I missing?
How do I fix it?
General Info
You'll get this error message when VB6 loads the Source Code Control add-in but it there is no default MSSCCI provider.
MSSCCI stands for Microsoft Source Code Control Interface and it is the standard API that is used by most IDEs to connect to a version control system (VCS). It was initially developed for Visual SourceSafe, and when you installed SourceSafe it included the MSSCCI provider for IDE integration. For some modern VCSs the MSSCCI provider has to be installed separately.
You can verify what MSSCCI providers have been installed on your system by looking at the registry key HKLM\SOFTWARE\SourceCodeControlProvider\InstalledSCCProviders.
(On a 64-bit system look at HKLM\SOFTWARE\Wow6432Node\SourceCodeControlProvider\InstalledSCCProviders instead.)
Most IDEs, including VB6, only support the default provider if more than one is installed. The default provider is stored in the registry key HKLM\SOFTWARE\SourceCodeControlProvider\ProviderRegKey.
Note: a handy app called SCCSwitcher is great if you have a need to change the default MSSCCI provider.
SourceGear Vault
Since you specifically mention the problem is with SourceGear Vault, it could be that you're running into the problem described in the Vault knowledge base called VB6 and VC++ 6.0 Integration on Windows 7 that includes the following steps:
Typically, for VB6 and VC++ 6.0 integration with Vault, your client
machine needs the .NET Framework
1.1. However, this version of the Framework is not supported on Windows 7. The workaround is to make VB6 load the .NET Framework 2.0
when starting VB6.
Here are the instructions for making VB6 load the 2.0 .NET framework:
1) Make a copy of the VaultGUIClient.exe.config (in the Vault GUI
Client directory) and rename it "VB6.exe.config."
2) Copy the "VB6.exe.config" file into the same directory as the
Visual Basic executable, "VB6.exe." Edit the VB6.exe.config file,
adding runtime information after the <configuration> line:
<startup>
<supportedRuntime version="v2.0.50727"/>
<requiredRuntime version="v2.0.50727" safemode="true"/>
</startup>
so that the first part of the config file looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
<requiredRuntime version="v2.0.50727" safemode="true"/>
</startup>
<system.net>
For Visual C++ 6.0, create an "MSDEV.exe.config" file using the
instructions above and place it in the MSDEV.exe directory.
(Note: This is for VB6 and VC++ 6.0 in Visual Studio 6 only. No
special configuration is needed for VB or Visual C++ integration in VS
2005/2008/2010.)
3) You may also need to modify your registry settings for Source
Control Provider on the Vault Client machine. For 64-bit Windows 7:
3a) In the registry, under
HKEY_LOCAL_MACHINE\Software\Wow6432Node\SourceCodeControlProvider add
a string called ProviderRegKey and give it the data
SOFTWARE\SourceGear\Vault Client.
3b) In the registry, under HKEY_LOCAL_MACHINE\Software\Wow6432Node
\SourceCodeControlProvider\InstalledSCCProviders, change the key that
might list the Vault VS 2003 Compatible Client to read as SourceGear
Vault Classic Client and give it the data of SOFTWARE\SourceGear\Vault
Client
I had this same issue using 'SourceSafe 6.0' (not Vault), fixed by installing SourceSafe from the VB6 installation media (I had skipped this originally thinking the 'MSSCCI provider' would handle it).
Note: oddly the 'Source Code Control' add-in was showing 'Startup / Loaded' in VB6 IDE before SourceSafe was installed.
Ref:
w10 (64-bit)
VB6 SP6
Microsoft Visual Studio Team Foundation Server 2013&2015 MSSCCI Provider (32-bit)
(https://marketplace.visualstudio.com/items?itemName=TFSPowerToolsTeam.MicrosoftVisualStudioTeamFoundationServer20132015M)(32-bit even though is w10 64-bit)
TFS 2015 update 4.2

visual studio debug fatal error 0x8007000e with .NET 4.5 while debugging .NET 4.0 application

After installing VS2012 and .NET 4.5 both Visual Studio 2010 and 2012 started hanging when debugging our application with a fatal error 0x8007000e. I know this error means the process is out of memory and I can see on task manager the devenv.exe process memory growing until it reaches the 3GB limit. At this point the exception occurs.
On the machines that don't have .Net 4.5 everything works fine. Our application is built in .Net 4.0 and migrating to .Net 4.5 it is not an option.
Is there any workaround for this? We would like to start using VS2012 but we can’t migrate all of our applications for .Net 4.5.
Thanks for the help,
Nuno Pereira
If you run under .NET 4.5 framework, but compile in .NET 4, you might want to try adding this to your config file:
<configuration>
<system.xml.serialization>
<xmlSerializer useLegacySerializerGeneration="true"/>
</system.xml.serialization>
</configuration>
As suggested to me in this link:
Serialization breaks in .NET 4.5
I've received feedback from Kevin Halverson about this issue. It seems that it is related to XmlSerialization. Generating static serialization assembly prevents the error from happening. Static serialization assembly can be generated using ‘sgen.exe’, ‘svcutil.exe /t:xmlSerializer’ or by turning on the ‘generate serialization assembly’ option on the project’s properties in Visual Studio.
Thanks to Anand and Kevin for all the help.

.NET 4 vs .NET 3.5 C# application. Could not load file or assembly 'x' or one of its dependencies. The specified module could not be found

I have a C# WPF application built in VS 2010 with Target Platform set to x86. This exe calls on a Managed DLL with target platform ANYCPU. The Managed DLL has a reference to a C++ DLL which is compiled with Common Language Runtime Support (/clr) option.
On .NET 3.5 the app works perfectly with on any OS. It works fine on Win 7 as well, on both 32bit and 64 bit.
Now that I have converted the application and its DLLs to target .NET 4. If it is run on a .NET less than 4, it throws an error that .NET 4 is required which is the expected result.
The converted app works fine on my development system and on any system that has .NET 4 + .NET 3.5. So far so good!
However, on systems with ONLY .NET 4 (ie Win 8) or win 7 without .NET 3.5, I get the error:
Could not load file or assembly 'x' or one of its dependencies. The specified module could not be found.
'x' is the C++ dll compiled with Language Runtime Support (/clr) option.
So, in short the problem only happens on systems with .NET 4 only.
Any advice would be appreciated.
Thank you,
- Kam
.NET 4 has back compatibility with all previous versions. So it doesn't seem the problem is in the platform version. Might it be folder's security? Try to check its permissions.
There was a change in native code loading policies since .NET 4. To resolve this, please add the App.config file to your .exe project with the following contents:
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
</startup>
</configuration>
This discussion may also help: What does 'useLegacyV2RuntimeActivationPolicy' do in the .NET 4 config?

Resources