Hi Team ,
I am converting a core application to target 32 bit but while launching application the console window automatically cloases and says "The program '[18400] dotnet.exe' has exited with code -532462766 (0xe0434352)."
Please Let me the solution for this .
Could you please run the application under debugger and share the callstack where it is crashing?
Is this related to dotnet/runtime#26655?
If so, should that issue be closed now in favor of this one?
Yes we can close that issue , but please do open this as existing issue
I ran the App is debugger mode but its not quiet hitting the breakpoints am i seeing call stack option.
This is what i have done .
1 . Created a core console project.
The above when ran the console app opens the command prompt and then closes automatically with error 532462766 .
You are hitting https://github.com/dotnet/cli/issues/7532. Could you please apply workaround described in https://github.com/dotnet/cli/issues/7532#issuecomment-330706524 ?
I did the solution explained in dotnet/corefx#7532 , But still i am facing the same error . This is what i have done
Downloaded SDK's
Created a folder in my project called Directory.Build.targets
then pasted below line of code in my .csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Condition="'$(OS)' == 'Windows_NT' and
 '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
 '$(SelfContained)' != 'true'">
<RunCommand Condition="'$(PlatformTarget)' == 'x86'">$(MSBuildProgramFiles32)\dotnet\dotnet</RunCommand>
<RunCommand Condition="'$(PlatformTarget)' == 'x64'">$(ProgramW6432)\dotnet\dotnet</RunCommand>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
</Project>
Still this is not working
Could you please try changing your .csproj file to the following and see whether it works:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup>
<RunCommand>$(MSBuildProgramFiles32)\dotnet\dotnet</RunCommand>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
</Project>
This creates a project that is hardcoded to x86 without all the moving parts.
If you just need that, you can use it. If you need this to be more abstract, you can add back the conditions as necessary.
Thanks!! Will try that and let you know
By Far the solution i got is by uninstalling 64 bit version of Core such that the application tends to take only 32 bit version of it .
You can close this issue
Most helpful comment
Could you please try changing your .csproj file to the following and see whether it works:
This creates a project that is hardcoded to x86 without all the moving parts.
If you just need that, you can use it. If you need this to be more abstract, you can add back the conditions as necessary.