moles.exe exited with error code -1004 When generating dll's for x86 - moles

I'm getting an Error Code -1004 When trying to generate moles assemblys for x86.
My Moles File:
<Moles xmlns="http://schemas.microsoft.com/moles/2010/" Diagnostic ="true">
<Assembly Name="mscorlib" x86="true" />
</Moles>
If I remove the x86="true" all works just fine
Here is the Output from Moles in my Build:
C:\Program Files (x86)\Microsoft Moles\bin\Microsoft.Moles.targets(79,5): error MSB3073: The command ""C:\Program Files (x86)\Microsoft Moles\bin\moles.exe" #C:\Projekte\Neue-FakeProjectName\Tests\ab.fakenamespace.Framework.Tests\obj\x86\Debug\Moles\moles.args" exited with code -1004.
Result: invalid in options (-1004 - 0xfffffc14) (TaskId:9)
Does anyone know how to resolve my problem?

Change the build configuration to "Any CPU". This generally corrects Moles target platform build issues.

Related

Azure DevOps - System.Security.Cryptography related errors when running build task in pipeline

In DevOps Server 2020 I've got a pipeline that has a MSBuild step that is failing for my UWP app. When attempting to build, I receive errors such as the following:
##[error]C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\Microsoft.NetNative.targets(805,5): Error : Type 'System.Security.Cryptography.Pkcs.SignedCms' from assembly 'System.Security.Cryptography.Pkcs' was not included in compilation, but was referenced in method 'Signature.GetContentPackage(SignedCms, X509IncludeOption)'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
##[error]C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\Microsoft.NetNative.targets(805,5): Error : Type 'System.Security.Cryptography.Pkcs.SignerInfo' from assembly 'System.Security.Cryptography.Pkcs' was not included in compilation, but was referenced in method 'Pkcs7.ValidateOverride(SignatureDataProperties, SignatureValidationProperties)'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
##[error]C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\Microsoft.NetNative.targets(805,5): Error : ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\x64\ilc\Tools\nutc_driver.exe #"O:\Agent1\_work\211\s\MyApp\MyApp.UWP\obj\x64\Release\ilc\intermediate\MDIL\MyApp.UWP.rsp"' returned exit code 1
I can successfully build the app if I execute the build manually via MSBuild in the command-line (using the same arguments as DevOps) but when DevOps attempts to do so, it gets those errors. I've tried searching for these errors but haven't had much luck finding anyone that has encountered this before. Hoping that someone here can offer some tips on what this might be, and how we can get this across the line. Thanks!

Errors building the Oculus-VR Unreal Engine (Oculus’ version of UE4)

I’ve been trying to build the UE4 version from Oculus that has more feature for XR development. But during the build I keep getting some errors, and honestly I’ve been reading a lot & have solved nothing. Please help me out. I’ll link the Output log right here:
OculusUE_log.txt (38.7 KB) (https://drive.google.com/file/d/1iLFmV5mZI3r8tJjAbxVqXnlWFcI6tNbj/view?usp=sharing)
Before everything comes crashing I get this:
12>C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt\wrl/event.h(211): error C4668: '_NOEXCEPT_TYPES_SUPPORTED' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
12>C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt\wrl/event.h(211): error C4668: '__cpp_noexcept_function_type' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
12>C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt\wrl/event.h(371): error C4668: '_NOEXCEPT_TYPES_SUPPORTED' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
12>C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt\wrl/event.h(371): error C4668: '__cpp_noexcept_function_type' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
12>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat -Target="UE4Editor Win64 Development" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild" exited with code 6.
12>Done building project "UE4.vcxproj" -- FAILED.
After these lines, it starts to skip a lot.

VSTS - Error MSB3202: The project file "..\Master\Master.sqlproj" was not found

All,
I set up MS Build TASK on VSTS that would work on a Git Repo containing a SSDT project.
When I run this task, I get the below error:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(283,5): Error MSB3202: The project file "..\Master\Master.sqlproj" was not found.
Process 'msbuild.exe' exited with code '1'.
ANy idea what this error could be?
Gopi

Cannot compile ts 2.2.2 file using Visual Studio Code

I cannot compile single ts-2.2.2 file, output I get is:
error TS5023: Unknown compiler option 'strictNullChecks'.
error TS5023: Unknown compiler option 'alwaysStrict'.
In the bottom-right corner VSCode displays TypeScript 2.2.2 which is the version I want to target. However, if I open my *.ts file, at the top of the screen a warning appears saying that "Version mismatch! global tsc (1.8.34) != VS Code's language service (2.2.2). Inconsistent compile errors might occur".
If I execute command 'where tsc' I get:
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.exe
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.js
How to excplicitly point the typescript compiler so that build process uses ts 2.2.2?

running nunit tests (x86) with gallio

I am trying to run nunit tests with gallio.
These tests run with nunit-console-x86.exe
When I run them with nunit-console.exe, I am getting System.BadImageFormatException
Running with Gallio.Echo.exe (installed the x86 bundle from gallio.org), I am getting the same exception. Is there a way to get gallio to use the nunit-console-x86.exe?
I am running the command "C:\Program Files (x86)\Gallio\bin\Gallio.echo.exe" /r:IsolatedProcess "C:\projectdata.Tests.dll"
and I am getting this exception:
Message
System.BadImageFormatException : Could not load file or assembly 'projectdata, Version=8.2.0.17, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Update: I figured out this is because I have project.dll(x86) and project.test.dll(Any CPU).
Any Ideas on how I can get gallio.echo to work for this? Is it possible to get a Gallio.Echo-x86.exe?
I was able to get it working by renaming the following files.
Gallio.Host.Elevated.exe --> Gallio.Host.Elevated.old.exe
Gallio.Host.Elevated.x86.exe --> Gallio.Host.Elevated.exe
Gallio.Host.exe --> Gallio.Host.old.exe
Gallio.Host.x86.exe --> Gallio.Host.exe
Note: You may want to create another copy of the gallio folder under program files to do this.
I have 2 copies. one in Program Files and one in Program Files (x86) with these changes.