corert
corert copied to clipboard
Publish broken when DisableImplicitFrameworkReferences set
trafficstars
I have 2 projects both of which configured in similar fashion
Runtime
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<RuntimeMetadataVersion>v4.0.30319</RuntimeMetadataVersion>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
</PropertyGroup>
App
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoStdLib>true</NoStdLib>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<NoConfig>true</NoConfig>
<RuntimeMetadataVersion>v4.0.30319</RuntimeMetadataVersion>
<IlcSystemModule>Runtime</IlcSystemModule>
</PropertyGroup>
This does not work on clean build. and start complaining that could not copy "App.exe" to bin/ location.
I use DisableImplicitFrameworkReferences to not have standard libraries attached to my CSC compilation process, since I use custom runtime.
I'm not sure is this CoreRT tooling, or regular .NET SDK tooling issue.
That looks like .NET SDK issue. You need to find the place that is trying to copy app.exe to bin in the .NET SDK targets and suppress it somehow.
I manage the make it work, but adding following lines:
<SelfContained>false</SelfContained>
<UseAppHost>false</UseAppHost>
And adding
<ItemGroup>
<LinkerArg Include="/subsystem:console /entry:__managed__Main /merge:.modules=.rdata /merge:.pdata=.rdata /DYNAMICBASE:NO /filealign:16 /align:16" />
</ItemGroup>
Questions:
- Should I document this somewhere in this repo?
- Can first part be part of .NET SDK ?
- If so which report should I file issue.
- Can this be part of CoreRT tooling?