-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AspNetCompiler
uses the wrong target framework
#87
Comments
Can you confirm what command you are using to publish your project, and which version of Visual Studio you have installed. If you can push a minimal example project to github I might be able to replicate and help. |
I've created a test repo: https://github.com/OronDF343/WebFormsSdkTest Two commands are included, |
Thanks - I replicated the issue with publish - I'll have to look further into that but it looks like replacing C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler.exe
|
Thanks, I have been able to confirm that the issue with .NET version is not reproducible in the test project. It appears to be related to the particular publish profile having excluded ...
<ExcludeFilesFromDeployment>web.config</ExcludeFilesFromDeployment>
<ExcludeFoldersFromDeployment>WebConfigs</ExcludeFoldersFromDeployment>
</PropertyGroup>
<Target Name="AdditionalFilesForPackage" AfterTargets="CopyAllFilesToSingleFolderForPackage;CopyAllFilesToSingleFolderForMsdeploy">
<Copy SourceFiles="$(ProjectDir)\WebConfigs\web.production.txt" DestinationFiles="$(_PackageTempDir)\web.config" OverwriteReadOnlyFiles="true" />
</Target> For now, I was able to work around it with this target: <Target Name="ReplaceConfig" AfterTargets="CopyAllFilesToSingleFolderForAspNetCompileMerge">
<Copy SourceFiles="$(ProjectDir)\WebConfigs\web.production.txt" DestinationFiles="$(CopyBeforeAspnetCompileMergeTargetPath)\web.config" OverwriteReadOnlyFiles="true" />
</Target> |
When attempting to precompile an ASP.NET WebForms app, the wrong version of
aspnet_compiler.exe
is chosen, and the wrong target framework version is used.Example
pubxml
:This example results in the 32-bit version of
aspnet_compiler.exe
being used. Adding<Platform>x64</Platform>
makes it use the 64-bit one, but it still targets an older framework version (maybe 4.0 as in #70 ?), which causes errors such aserror CS0117: 'System.Net.SecurityProtocolType' does not contain a definition for 'Tls12'
.The text was updated successfully, but these errors were encountered: