SQL CLR no longer deploys to SQL 2008 - c#

I have a SQL CLR project that deploys stored procs to a server. For 2 years I've always been able to just right click the project and deploy. Yesterday I have started to get errors when I try to do that. I was able to deploy a new version last week but not this week.
------ Build started: Project: '', Configuration: Debug Any CPU ------
'' -> E:\Development\Code\SqlDeployables\''\bin\Debug\''.dll
------ Deploy started: Project: '', Configuration: Debug Any CPU ------
Error: Class not registered.
Looking for object with CLSID: {475E0C1F-1E61-4197-9324-10A148C512F8}.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
I've been searching around and can't find anything on the error. There has been no updates on the sql server since I could last deploy. I have uninstalled my VS2010 updates as well as .net updates on my machine and that has not done anything. The only updates I have not uninstalled were office ones, which I would think are not the problem.
Any ideas? I've tried resetting permissions on the sql machine. Removed Stored procs manually and redeploy. I've gone back to a previous version of the project and tried to deploy. Restarted SQL Server services on machine.
Visual Studio 2010
SQL Server 2008
Thanks

Somehow your visual studio install has gotten messed up. That CLSID points to the class Microsoft.VisualStudio.Data.Schema.Package.Sql.Internal.ManagedBuildLoggerComClass in the com object C:\Windows\system32\mscoree.dll.
I would recommend trying to do a repair install on visual studio and see if that fixes your issue.

I had the same problem, and I couldn't figure out how to solve it. I think it might have something to do w/ a side-by-side install of VS2012, but I am not sure.
As a workaround I wrote my own T-SQL deploy script. The project builds all right, and it outputs dlls all right. All that is missing is the database deploy (ie, the commands that VS runs against the database to actually deploy your types and methods to the server). In the project's bin folder you may find the .sql file that VS generates; you can use this as a template. The deploy script will end up looking something like this:
USE SomeDatabase
GO
IF OBJECT_ID('dbo.[SomeFunction]') IS NOT NULL DROP FUNCTION dbo.[SomeFunction]
IF EXISTS (SELECT * FROM sys.assemblies WHERE NAME = 'SomeAssembly') DROP ASSEMBLY [SomeAssembly]
GO
CREATE ASSEMBLY [SomeAssembly] AUTHORIZATION dbo
FROM '\path\to\your\dll'
WITH PERMISSION_SET = SAFE
GO
CREATE FUNCTION [dbo].[SomeFunction] ....
EXTERNAL NAME [SomeAssembly].[SomeAssembly.UserDefinedFunctions].[SomeMethod]
GO
Then deploy your stuff manually via SSMS.

Related

Error Metadata file dll could not be found CSC when publishing

I have a Visual studio solution with several projects in it, specifically a DotNet5 asp.net app, that has several netstandard 2.0 references on it. it builds and runs fine in the debugger but continuously throws the metadata errors. It keeps specifically referencing its looking for a net5 folder in the netstandard2 project. I cannot find where its getting this from, the problematic one used to be a multitargeted project against framework 4.7, 4.8, and net5.0, but i got annoyed with the multiple dll's and just migrated it to standard2.0 and had no issues till i want to publish it.
I've tried what a few other questions referenced, cleaning, rebuilding, remove and re add references to other projects, deleted the obj and bin folders out of the solution, the removing the sou file, tried VS 2019 (16.9.0 preview 2) preview vs 2019 (16.8.3) release, different computer (pulled back down from a lan git repository) and got the same error.... also tried searching the entire solution for references to net5.0 and didn't find it outside of the expected locations like the csproj for the asp.net project and its respective pubxml. And just for fun, I temporarily retargeted the library project back to net5.0 and it still threw the same error even when the exact file and path listed did exist.
Using enters for the error below for the different columns in the error message, and removed the "sensitive" info. There is no error code provided by Visual Studio. Anyone else got any more ideas on what to try?
Error
Metadata file 'C:\Users\UserName\source\repos\Solution\Project 2\bin\Release\net5.0\ref\Project 2.dll' could not be found.
Project 1
CSC
0
Edit: adding a couple other sections of the error messages:
1/2/2021 7:38:55 PM
System.AggregateException: One or more errors occurred. ---> Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.
--- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.<---
Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.
===================
And the end of the output window since full thing is a bit too long. still can't figure out where its getting the net5.0 for the one project reference
/reference:C:\Users\UserName\.nuget\packages\system.xml.xpath.xmldocument\4.0.1\ref\netstandard1.3\System.Xml.XPath.XmlDocument.dll /reference:C:\Users\UserName\.nuget\packages\mysql.data\8.0.22\lib\net5.0\Ubiety.Dns.Core.dll /reference:"C:\Users\UserName\source\repos\CheckNotes\Project 3\bin\Release\netstandard2.0\Project 3.dll" /reference:"C:\Users\UserName\source\repos\CheckNotes\Project 2\bin\Release\net5.0\ref\Project 2.dll" /reference:C:\Users\UserName\source\repos\CheckNotes\Project 4\bin\Release\netstandard2.0\Project 4.dll /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\5.0.0\ref\net5.0\WindowsBase.dll" /reference:C:\Users\UserName\.nuget\packages\mysql.data\8.0.22\lib\net5.0\Zstandard.Net.dll /debug+ /debug:portable /filealign:512 /optimize+ /out:"obj\Release\net5.0\CheckNotes Web - Core.dll" /refout:"obj\Release\net5.0\ref\CheckNotes Web - Core.dll" /target:exe /warnaserror- /utf8output /deterministic+ /langversion:9.0 /analyzerconfig:"obj\Release\net5.0\CheckNotes Web - Core.GeneratedMSBuildEditorConfig.editorconfig" /analyzerconfig:"C:\Program Files\dotnet\sdk\5.0.200-preview.20601.7\Sdks\Microsoft.NET.Sdk\analyzers\build\config\AnalysisLevel_5_Default.editorconfig" /analyzer:"C:\Program Files\dotnet\sdk\5.0.200-preview.20601.7\Sdks\Microsoft.NET.Sdk.Web\analyzers\cs\Microsoft.AspNetCore.Analyzers.dll" /analyzer:"C:\Program Files\dotnet\sdk\5.0.200-preview.20601.7\Sdks\Microsoft.NET.Sdk.Web\analyzers\cs\Microsoft.AspNetCore.Mvc.Analyzers.dll" /analyzer:"C:\Program Files\dotnet\sdk\5.0.200-preview.20601.7\Sdks\Microsoft.NET.Sdk.Web\analyzers\cs\Microsoft.AspNetCore.Components.Analyzers.dll" /analyzer:"C:\Program Files\dotnet\sdk\5.0.200-preview.20601.7\Sdks\Microsoft.NET.Sdk\targets\..\analyzers\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll" /analyzer:"C:\Program Files\dotnet\sdk\5.0.200-preview.20601.7\Sdks\Microsoft.NET.Sdk\targets\..\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll" Controllers\AssemblyController.cs Controllers\CheckNotesController.cs Controllers\ContactsController.cs Controllers\CustomerController.cs Controllers\HomeController.cs Controllers\ImageController.cs Controllers\OperatorPagesController.cs Controllers\PalletsController.cs Controllers\SharedController.cs Controllers\StatisticsController.cs Models\ControllerClass\ctrlrAssembly.cs Models\ControllerClass\CtrlrCheckNotes.cs Models\ControllerClass\ctrlrContacts.cs Models\ControllerClass\CtrlrCustomer.cs Models\ControllerClass\CtrlrOperatorPages.cs Models\ControllerClass\CtrlrPallet.cs Models\ControllerClass\ctrlrStats.cs Models\DataClass\AppSettings.cs Models\ErrorViewModel.cs Models\renderAction.cs Program.cs Startup.cs "obj\Release\net5.0\.NETCoreApp,Version=v5.0.AssemblyAttributes.cs" "obj\Release\net5.0\CheckNotes Web - Core.AssemblyInfo.cs" "obj\Release\net5.0\CheckNotes Web - Core.RazorAssemblyInfo.cs" /warnaserror+:NU1605
CSC(0,0): Error CS0006: Metadata file 'C:\Users\UserName\source\repos\CheckNotes\Project 2\bin\Release\net5.0\ref\Project 2.dll' could not be found
10>Build failed. Check the Output window for more details.
========== Build: 9 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
Got it to publish but I am so confused....something to do with the publish profile. If i delete that and generate a new one, works fine. as soon as i edit it using the GUI, broken....generate it again. So far seems ok to edit it manually but TBD. not sure if the "fix" will survive restarting Visual studio or not.
Edit - Scratch that, found the difference.
Remove the following line in Properties/FolderProfile.pubxml and it's fine.
<TargetFramework>net5.0</TargetFramework>

UWP : SignTool Error: Access is denied. ( Resolve ! )

This is re-Question about issue "SignTool Error: Access is denied." on my visual studio.
When I compile "SideLoad" application on Visual Studio 2017. This error happened again.
This is not first time for me. Previously, I could not resolve this error. Then, I bought New DELL PC :( Yes, During some period, It worked fine without any problem. but I saw same error again, Today !
Here is some additional information.
x64, Windows 10, Os ver 1703 , Build 15063.675.
Visual Studio 2017
This is new PC. Administrator, Local user, not MSN user.
Target version : Windows 10 Creator Update ( 10.0; Build 15063 )
Min version : Windows 10 November Update ( 10.0; Build 10586 )
After build of side load applicaiton, This error show ::
1> Bg7Uwp1 -> D:\develop\visualstudio2\xxx\Bg7Uwp1\Bg7Uwp1\bin\x86\Release\Bg7Uwp1.exe
1> Processing application code
1> Computing application closure and generating interop code
1> Loading 108 modules...
1> Generating code...
1> Interop code generated.
1> Generating serialization code
1> Compiling interop code
1> Generating System.Reflection.DispatchProxy proxy code.
1> Cleaning up unreferenced code
1> Generating native code
1> Generating fixups for native code
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(3787,5): error APPX1204: Failed to sign 'D:\develop\visualstudio2\xxx\Bg7Uwp1\Bg7Uwp1\bin\x86\Release\Bg7Uwp1_1.0.9.0_x86.appx'. SignTool Error: Access is denied.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(3787,5): error APPX1204: SignTool Error: An error occurred while attempting to sign: D:\develop\visualstudio2\xxx\Bg7Uwp1\Bg7Uwp1\bin\x86\Release\Bg7Uwp1_1.0.9.0_x86.appx
1>
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(3787,5): error APPX1204:
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Package: 0 succeeded, 2 failed ===========
========== App Bundle: 0 succeeded, 1 failed ===========
Please give me some idea. I tried everything from internet and here. but Previously, I could not resolve.. I can not buy new PC again !
Update 1
and After this trouble, I open new Uwp project and start sideload compile. it show same error ! This is same situation with previous PC ! Now, My Vs2017 can not make sideload for an
empty UWP project !!
in previous PC, I tried everything. Re-install VS2017, Re-install NuGet items. but it did not resolve at all. Only way was to buy new PC and re-install VS.
Update 2
With verbose mode of VS2017 compile output, I found , There is signtool.exe in SignAppxPackageExeFullPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\signtool.exe
with it, I tried to sign by myself.
Open command prompt tool with Admin
Run below command. I success to sign !??
Update 3
Next challenge is to add "Admin privilege" with "Signtool.exe" like this. but this was failed. Error was changed. "It need administrator privilege" and it make build error. not success.
Question
If I do sign manually, Is it enough ?
I signed with manual ( target file is : Bg7Uwp1_1.0.19.0_x64.appx ) "c:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\signtool.exe" sign /fd SHA256 /a /f Bg7Uwp1_TemporaryKey.pfx bin\x64\Release\Bg7Uwp1_1.0.19.0_x64.appx
Done Adding Additional Store
Successfully signed: bin\x64\Release\Bg7Uwp1_1.0.19.0_x64.appx
I copy all "Release" folder to other PC.
I copy "Bg7Uwp1_TemporaryKey.pfx" to other PC too.
On 2nd PC, I install the certification key first "Bg7Uwp1_TemporaryKey.pfx". Success.
I tried to install with clicking Bg7Uwp1_1.0.19.0_x64.appx
I can not installed : (
Either you need a new certificate installed for this app package, or you need a new app package with trusted certificates. Your system administrator or the app developer can help. A certificate chain processed, but terminated in a root certificate which isn't trusted (0x800B0109)
Find! a solution but Not perfect yet.
with above error, I read this.. This is a step to install sideload application to PC. I follow this. I can resolve the error 0x800B0109.
In File Explorer, right-click on the app package, and in the pop-up context menu select Properties.
In the Properties dialog, select the Digital Signatures tab.
In the Signature list, select the signature and then click the Details button.
In the Digital Signature Details dialog, click the View Certificate button.
In the Certificate dialog, click the Install Certificate… button.
In the Certificate Import Wizard, select Local Machine and then click Next. You will need to grant administrator privileges to continue.
Select Place all certificates in the following store and browse to the Trusted People store.
Click Next, then click Finish to complete the wizard.
after this step, I can install my Sideload to my Own PC. but To install 2nd PC has error. ( New error 0x80073CF3 ) . but I get big improvement !
Update 4 ( Not resolve still ! )
Now, TO install other PC is not impossibile. Dependencies file can not create by VS. because signtool has error.I have to install other PC. Without it, All my time would be waste.. :( please help me...
This is old dependencies files. I have to make it for my ver 19.
Update 5
I check What Vs2017 is doing in background. I used ProcessMonitor. and She execute this command. It look like no problem. I tried with Admin-MS-prompt, It success.
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\signtool.exe" sign /fd sha256 /f "Bg7Uwp1_TemporaryKey.pfx" "D:\develop\visualstudio2\shinwatec\Bg7Uwp1\Bg7Uwp1\bin\x64\Release\Bg7Uwp1_1.0.19.0_x64.appx"
but Without Admin, I got same error with VS2017 !
I found the solution ! and fix it.
with ProcessMonitor, I found this line.
signtool.exe has "Access denied" to access %appdata%\local\Temp
I check the folder permission. There is no permission on the Temp folder. I added my own user Networkname\username .
After this. I success to fix this issue. Now my visualStudio 2017 can make sideLoad application ! Yes, I do not need to buy new PC again :)
thank you. Mr. BugFinder.

Windows 10 System.Exception: Install failed. Please contact your software vendor

I'd like to create 2 apps from the same project(VS solution), both of them has the same functional with small differences. So I just made 2 copies of my solution and I changed solution name, namespace and asigned app to different Microsoft Store app. When I try to instal secnod app on phone I get:
2>caught exception: System.Exception: Install failed. Please contact your software vendor. (Exception from HRESULT: 0x80073CF9)
2> at Windows.Foundation.IAsyncOperationWithProgress`2.GetResults()
2> at Microsoft.VisualStudio.ImmersiveProjectServices.PlatformShim.AppxCancelableDeployOp.Microsoft.VisualStudio.ImmersiveProjectServices.PlatformShim.IAppxCancelableDeployOp.Execute()
2> at Microsoft.VisualStudio.ImmersiveProjectServices.Shared.AppxLayoutManager.RunDeployOpWithCancel(IAppxCancelableDeployOp deployOp, CancelManager cancel)
2> at Microsoft.VisualStudio.ImmersiveProjectServices.Shared.AppxLayoutManager.RegisterPackage(String location, DeployPackageName deployPackageName, CancelManager cancel)
2> at ImmersiveDeploy.Program.ExecuteTask(String[] args, Int32 argument, XDocument immersiveDeployResults, ImmersiveDeployTask task, DeployPackageName deployPackageName)
2> at ImmersiveDeploy.Program.Main(String[] args),
2>
2>*** End of logging from deployment agent ***
2>Error : DEP0001 : Unexpected Error: Install failed. Please contact your software vendor. (Exception from HRESULT: 0x80073CF9)
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
Projects build report:
Status | Project [Config|platform]
-----------|---------------------------------------------------------------------------------------------------
Succeeded | BackgroundTaskRawNotification\BackgroundTaskRawNotification.csproj [Debug|x86]
Succeeded | MySolution\MyApp.csproj [Debug|x86]
Failed | MySolution\MyApp.csproj [Debug|x86]
As is mentioned in other questions, if I uninstall one of them, the second is installing but I'd like to made some changes to install both of them. Have to mention that on PC I can install both apps from Visual Studio with no errors.
I am using:
Windows 10 Pro
Visual Studio Version 14.0.24720.00 Update1
Mobile Emulator 10.0.10240.0
Any advices are appreciated.
P.s. In android we have gradle flavors that helps us to build different apps from the same Android Studio project, maybe there is something similar in Visual Studio?
The purpose of reserving multiple names for an App is that the name has meaning for different languages. E.g. an English speaking person would understand "My Great App" and a German speaking e.g. "Meine tolle App". When you assign multiple names to the same App which is identified by it's ID you do not have two Apps but just one with multiple names. That is why you're getting the error.
You could try to change these IDs manually but the easiest, fastest and safest way would be to just let Visual Studio do the work by creating a new project and copy/paste/include your files.
Anyway if your intention is to create a "Free" and a "Pro" version you should consider doing it the recommended way and use in App purchases or create a trial version.
In the package.appxmanifest file, in the Package tab change the Package Name value. Notice how changing this will also change the Package Family Name as well.
Lastly, change the Display Name from the Application tab so you can differentiate the apps when ruuning.

Out of memory error when compiling UWP app in release mode with .Net native

I have a solution where my main project is a uwp app, and two other projects referenced by the app :
UWP App ---> references 2.
Universal Class library ----> references 3.
PCL Library
2 --> uses EF7 and SQLight.
3 --> uses PCLCrypto
Now, everything works just fine and excellent when I'm on Debug mode x86 targeting local machine.
I want to compile the solution in release mode using .Net native tool chain, here's my config :
When I launch the compilation, it takes a remarkably long time, and too much memory is consumed by the .Net native tools :
After some time, everything stops with 2 errors on visual studio :
Here's what the output window says :
1>------ Build started: Project: ServerCommunication, Configuration:
Release Any CPU ------ 1> ServerCommunication ->
C:\Users\aymen\Documents\Visual Studio
2015\Projects\Applinova\Liberte\ServerCommunication\bin\Release\ServerCommunication.dll
2>------ Build started: Project: NewspaperDataLayer, Configuration:
Release x86 ------ 2>C:\Users\aymen\Documents\Visual Studio
2015\Projects\Applinova\Liberte\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets(225,5):
warning : All projects referencing ServerCommunication.csproj must
install nuget package Microsoft.Bcl.Build. For more information, see
http://go.microsoft.com/fwlink/?LinkID=317569. 2> NewspaperDataLayer
-> C:\Users\aymen\Documents\Visual Studio 2015\Projects\Applinova\Liberte\NewspaperDataLayer\bin\x86\Release\NewspaperDataLayer.dll
3>------ Build started: Project: Liberte, Configuration: Release x86
--some warnings here that I just skipped
3> Starting .NET Native compilation 3> Processing application code
3>C:\Users\aymen\Documents\Visual Studio
2015\Projects\Applinova\Liberte\Liberte\Resources.System.Linq.Expressions.rd.xml(35):
warning : Method 'CreateLambda' within
'System.Linq.Expressions.Expression' could not be found.
3>C:\Users\aymen\Documents\Visual Studio
2015\Projects\Applinova\Liberte\Liberte\Resources.System.Linq.Expressions.rd.xml(91):
warning : Method 'ParameterIsAssignable' within
'System.Linq.Expressions.Expression' could not be found. 3> Computing
application closure and generating interop code 3> Generating
serialization code 3> Compiling interop code 3> Cleaning up
unreferenced code 3> Generating native code 3>STARTPROCESSTASK :
error : Out of Memory 3>C:\Program Files
(x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets(1129,5):
error : ILT0005: 'C:\Program Files
(x86)\MSBuild\Microsoft.NetNative\x86\ilc\Tools\nutc_driver.exe
#"C:\Users\aymen\Documents\Visual Studio
2015\Projects\Applinova\Liberte\Liberte\obj\x86\Release\ilc\intermediate\MDIL\Liberte.rsp"'
returned exit code 1
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
What would possibly be wrong with this please ??
I had the same problem (I am also using EF7 and other libraries) but I solved using Visual Studio 15 preview (it is not visual studio 2015 update 2, which I didn't try). They improved the .NET native tools so now you should not have any problem, even if using a lot of third party library.
UPDATE
I have solved all my issues after i have installed visual studio 2015 update 3 and switched from EF7 to EF core also available via nuget
I have been struggled past few days around trying to fix this problem, but currently there is no easy solution for it.
There is a closed Issue on EF7 github, more info here (https://github.com/aspnet/EntityFramework/issues/4387) where they suggest as solution update EF7 to v1.0.0-rc2-16898.
I didn't manage how to update and as it still a nightly version, my final solution ("fast" workaround) was change my entire DB to sqlite-pcl (https://visualstudiogallery.msdn.microsoft.com/4913e7d5-96c9-4dde-a1a1-69820d615936).
If you aren't in a rush to lunch your application, you can always wait until final version of RC2 it should be done during April.

Monogame Content Pipeline has stopped working

The other day I started up my monogame project and started it up to do a quick play test. It wouldn't work. I was getting 2 errors.
Error 1 The command "SETX MONOGAME_PLATFORM "PSM" > NUL" exited with code 9009. GameName1
Error 2 Metadata file 'C:\Users\Sean\Desktop\Prog\Learning\3D Learning\GameName1\GameName1\bin\PSM\IgnoreMe.dll' could not be found C:\Users\Sean\Desktop\Prog\Learning\3D Learning\3D Learning\CSC 3D Learning
And here is the output from the build.
1>------ Build started: Project: Learnplscon, Configuration: PSM Any CPU ------
1> MonoGame Platform PSM
1> 'SETX' is not recognized as an internal or external command,
1> operable program or batch file.
1>C:\Program Files (x86)\MSBuild\MonoGame\v3.0\MonoGame.ContentPipeline.targets(22,7): error MSB3073: The command "SETX MONOGAME_PLATFORM "PSM" > NUL" exited with code 9009.
2>------ Build started: Project: learnpls, Configuration: Debug x86 ------
2>CSC : error CS0006: Metadata file 'C:\Users\Sean\Desktop\Prog\Learning\learnpls\Learnplscon\Learnplscon\bin\PSM\IgnoreMe.dll' could not be found
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
But Building from last successful build works.
I did not change anything. And any new project I make gets the same problem.
The problem only happens when I add a reference to my content project.
(Referenced project this way: monogame-managing-content )
I made a new project, ran it, everything worked fine. Created a mono game content project, ran it and everything worked fine. Then I added the reference and got the errors. And when I remove the reference Error 2 goes away but error 1 is still there, but the project will run fine.
I have tried reinstalling xna, and monogame. Also tried to reinstall visual studios. I spent all night trying to find an answer online but came up with nothing.
I am using the most recent version of XNA and Monogame 3.2, and I am using windows 8.1.
In case you're still having this problem, or someone else finds the question (like I did trying to solve this a little while ago): for me, the problem was that my windows/system32 directory wasn't in my 'path' environment variable. That's where the setx.exe program resides, and the XNA content project seems to assume that it can call setx without qualifying the path.
Note: Visual Studio seems to need to be restarted after you've added your /system32 directory to the path.

Categories