-
Notifications
You must be signed in to change notification settings - Fork 181
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
Unable to build win latest nuget on net45 #971
Comments
@oleg-shilo, I propose to retarget to .Net 4.5.1 Why it is a balanced alternative ?
|
Agree. |
All good builds OK |
I believe that the installer should be as independent as possible from the installations in the system. I urge you not to make sudden movements, but to use versions 4.0 or 3.5. And for those who have crooked hands, your problems. No need to provoke. |
* Issue #971: Unable to build win latest nuget on net45 * Downgraded target runtime to v4.5.1. To improve compatibility
I think the move from .NET v3.5->v4.x should have been cause for a major version bump in the WixSharp project. |
I am not necessarily strongly opposing it but... The same way as you may have Product vx.x.x that has two distros. One for one platform/runtime and another one for a different one. |
Despite me questioning the need for increasing the WixSharp version I agree with Tyler that considering the version bump is a must when it comes to the migration on different runtime. The answer "to bump or not to bump" may be different in different situations but the consideration is a must. Thus I am facing a very similar question for CS-Script (https://github.com/oleg-shilo/cs-script). I am about to release a new build that targets .NET5. Tough in this case the functionality of the product is dramatically changed because of the new features of .NET 5 so the version is getting increased v3.30.5 -> v4.0.0.0 |
This does seem to be a bit of a grey area. I see this "when you make incompatible API changes" as a guideline and as such is not explicit enough of a description to cover all situations. When a downstream project updates to a minor build (e.g. WixSharp v1.14.8->v1.16.x), backward compatibility is expected. In this situation, the move to a higher .NET target has not ensured backward compatibility is maintained. Example. My installer project is currently targeting .NET v3.5 with WixSharp v1.14.8. My project updates to WixSharp v1.16. Backward compatibility is expected however the build breaks due to the higher .NET requirement. |
Small question: |
I would expect it to be OK. Both versions rely on the same CLR v2. If none is specified WixSharp generates this one: using (var writer = new IO.StreamWriter(configFile))
writer.Write(@"<?xml version=""1.0"" encoding=""utf-8"" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy=""true"">
<supportedRuntime version=""v" + Environment.Version.ToNoRevisionString() + @"""/>
<supportedRuntime version=""v4.0"" sku="".NETFramework,Version=v4.5""/>
<supportedRuntime version=""v4.0"" sku="".NETFramework,Version=v4.0""/>
<supportedRuntime version=""v2.0.50727""/>
<supportedRuntime version=""v2.0.50215""/>
<supportedRuntime version=""v1.1.4322""/>
</startup>
</configuration>");
Compiler.TempFiles.Add(configFile); |
@oleg-shilo

Build started... 1>------ Build started: Project: SetupBuilderTest, Configuration: Debug Any CPU ------ 1>Build started 16.02.2021 15:07:33. 1>Target BeforeBuild: 1> Copying file from "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\nbsbuilder.exe" to "C:\Users\xbart\Documents\Sources\Research\WIx#\SetupBuilderTest\SetupBuilderTest\bin\Debug\net45\nbsbuilder.exe". 1>Target ResolveAssemblyReferences: 1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3274: The primary reference "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\WixSharp.Msi.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3275: The primary reference "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\WixSharp.dll" could not be resolved because it has an indirect dependency on the assembly "WixSharp.Msi, Version=1.16.1.0, Culture=neutral, PublicKeyToken=3775edd25acc43c2" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3275: The primary reference "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\WixSharp.UI.dll" could not be resolved because it has an indirect dependency on the assembly "WixSharp.Msi, Version=1.16.1.0, Culture=neutral, PublicKeyToken=3775edd25acc43c2" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3274: The primary reference "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\WixSharp.UI.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3274: The primary reference "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\WixSharp.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3275: The primary reference "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\WixSharp.UI.dll" could not be resolved because it has an indirect dependency on the assembly "WixSharp, Version=1.16.1.0, Culture=neutral, PublicKeyToken=3775edd25acc43c2" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1>Done building target "ResolveAssemblyReferences" in project "SetupBuilderTest.csproj". 1>Target _WriteAppConfigWithSupportedRuntime: 1> Skipping target "_WriteAppConfigWithSupportedRuntime" because all output files are up-to-date with respect to the input files. 1>Target GenerateBindingRedirects: 1> No suggested binding redirects from ResolveAssemblyReferences. 1>Target GenerateTargetFrameworkMonikerAttribute: 1> Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. 1>Target CoreGenerateAssemblyInfo: 1> Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files. 1>Target CoreCompile: 1> Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn 1> C:\Users\xbart\Documents\Sources\Research\WIx#\SetupBuilderTest\SetupBuilderTest\Program.cs(3,11,3,19): error CS0246: The type or namespace name 'WixSharp' could not be found (are you missing a using directive or an assembly reference?) 1>Done building target "CoreCompile" in project "SetupBuilderTest.csproj" -- FAILED. 1> 1>Done building project "SetupBuilderTest.csproj" -- FAILED. 1> 1>Build FAILED. 1> 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3274: The primary reference "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\WixSharp.Msi.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3275: The primary reference "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\WixSharp.dll" could not be resolved because it has an indirect dependency on the assembly "WixSharp.Msi, Version=1.16.1.0, Culture=neutral, PublicKeyToken=3775edd25acc43c2" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3275: The primary reference "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\WixSharp.UI.dll" could not be resolved because it has an indirect dependency on the assembly "WixSharp.Msi, Version=1.16.1.0, Culture=neutral, PublicKeyToken=3775edd25acc43c2" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3274: The primary reference "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\WixSharp.UI.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3274: The primary reference "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\WixSharp.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): warning MSB3275: The primary reference "C:\Users\xbart\.nuget\packages\wixsharp.bin\1.16.1-hotfix\lib\WixSharp.UI.dll" could not be resolved because it has an indirect dependency on the assembly "WixSharp, Version=1.16.1.0, Culture=neutral, PublicKeyToken=3775edd25acc43c2" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". 1>C:\Users\xbart\Documents\Sources\Research\WIx#\SetupBuilderTest\SetupBuilderTest\Program.cs(3,11,3,19): error CS0246: The type or namespace name 'WixSharp' could not be found (are you missing a using directive or an assembly reference?) 1> 6 Warning(s) 1> 1 Error(s) 1> 1>Time Elapsed 00:00:00.23 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The text was updated successfully, but these errors were encountered: