Skip to content
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

Wallymathieu upgrade to vs2017 format #948

Merged
merged 12 commits into from
Sep 17, 2024

Conversation

Alexander-Hjelm
Copy link
Collaborator

Supersedes #860

@Alexander-Hjelm
Copy link
Collaborator Author

The build pipeline is now failing. Additionally I can no longer build the solution locally. See the error output below.

I'm closing the PR. Feel free to work on it and reopen #860 if you feel strongly that this is something that should be merged @wallymathieu

Starting: NuGet restore
==============================================================================
Task         : NuGet
Description  : Restore, pack, or push NuGet packages, or run a NuGet command. Supports NuGet.org and authenticated feeds like Azure Artifacts and MyGet. Uses NuGet.exe and works with .NET Framework apps. For .NET Core and .NET Standard apps, use the .NET Core task.
Version      : 2.231.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/package/nuget
==============================================================================
Caching tool: NuGet 5.9.3 x64
Found tool in cache: NuGet 5.9.3 x64
Resolved from tool cache: 5.9.3
Using version: 5.9.3
Found tool in cache: NuGet 5.9.3 x64
C:\Windows\system32\chcp.com 65001
Active code page: 65001
Detected NuGet version 5.9.3.3 / 5.9.3+e58482f869e18a390b0a557bc15d2f2240eeb023.e58482f869e18a390b0a557bc15d2f2240eeb023
C:\hostedtoolcache\windows\NuGet\5.9.3\x64\nuget.exe sources Add -NonInteractive -Name NuGetOrg -Source https://api.nuget.org/v3/index.json -ConfigFile D:\a\1\Nuget\tempNuGet_15295.config
Package source with Name: NuGetOrg added successfully.
C:\hostedtoolcache\windows\NuGet\5.9.3\x64\nuget.exe restore D:\a\1\s\src\WorkItemMigrator\WorkItemMigrator.sln -Verbosity Detailed -NonInteractive -ConfigFile D:\a\1\Nuget\tempNuGet_15295.config
D:\a\1\s\src\WorkItemMigrator\Migration.WIContract\Migration.WIContract.csproj : error : Version 6.0.417 of the .NET SDK requires at least version 17.0.0 of MSBuild. The current available version of MSBuild is 16.11.2.50704. Change the .NET SDK specified in global.json to an older version that requires the MSBuild version currently available.
NuGet Version: 5.9.3.3
D:\a\1\s\src\WorkItemMigrator\Migration.WIContract\Migration.WIContract.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
MSBuild auto-detection: using msbuild version '16.11.2.50704' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
D:\a\1\s\src\WorkItemMigrator\JiraExport\jira-export.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
MSBuild P2P timeout [ms]: 120000
D:\a\1\s\src\WorkItemMigrator\Migration.Common\Migration.Common.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\bin\msbuild.exe "C:\Users\VssAdministrator\AppData\Local\Temp\NuGetScratch\mey431lg.kup.nugetinputs.targets" /t:GenerateRestoreGraphFile /nologo /nr:false /v:q /p:NuGetRestoreTargets="C:\Users\VssAdministrator\AppData\Local\Temp\NuGetScratch\10tdzfgu.dlb.nugetrestore.targets" /p:RestoreUseCustomAfterTargets="True" /p:RestoreTaskAssemblyFile="C:\hostedtoolcache\windows\NuGet\5.9.3\x64\nuget.exe" /p:RestoreSolutionDirectory="D:\a\1\s\src\WorkItemMigrator\\" /p:RestoreConfigFile="D:\a\1\Nuget\tempNuGet_15295.config" /p:SolutionDir="D:\a\1\s\src\WorkItemMigrator\\" /p:SolutionName="WorkItemMigrator"
D:\a\1\s\src\WorkItemMigrator\WorkItemImport\wi-import.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
NuGet.CommandLine.ExitCodeException: Exception of type 'NuGet.CommandLine.ExitCodeException' was thrown.
D:\a\1\s\src\WorkItemMigrator\Migration.Common.Log\Migration.Common.Log.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
   at NuGet.CommandLine.MsBuildUtility.<GetProjectReferencesAsync>d__6.MoveNext()
D:\a\1\s\src\WorkItemMigrator\tests\Migration.Jira-Export.Tests\Migration.Jira-Export.Tests.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
--- End of stack trace from previous location where exception was thrown ---
D:\a\1\s\src\WorkItemMigrator\tests\Migration.Common.Tests\Migration.Common.Tests.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
D:\a\1\s\src\WorkItemMigrator\tests\Migration.WIContract.Tests\Migration.WIContract.Tests.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
D:\a\1\s\src\WorkItemMigrator\tests\Migration.Wi-Import.Tests\Migration.Wi-Import.Tests.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
   at NuGet.CommandLine.RestoreCommand.<GetDependencyGraphSpecAsync>d__68.MoveNext()

@wallymathieu
Copy link
Contributor

The error says that you don't have a recent enough msbuild version. What probably should be done then is to make sure that the image is recent enough:
https://github.com/solidify/jira-azuredevops-migrator/blob/master/azure-pipelines.yml#L4-L5

@wallymathieu
Copy link
Contributor

From the error it looks like there has been some additions to the csproj that have been merged in

https://github.com/solidify/jira-azuredevops-migrator/blob/wallymathieu-upgrade-to-vs2017-format/src/WorkItemMigrator/JiraExport/jira-export.csproj#L83C2-L103

In the new format, there is no need to explicitly include c#-files for compilation.

I don't feel strongly about this feature. It is mostly in order to be able to run on later .net than .net-framework.

@Alexander-Hjelm
Copy link
Collaborator Author

Tried to delete explicit includes in JiraExport.exe, but now no files are created by the build.

I will have to look into this at a later time.

@wallymathieu
Copy link
Contributor

That sounds odd to say the least. When I build it locally it builds into bin/release/net6 even though there is only one targetframework.

Another way to compile it into a "publish" executable would be to execute :

dotnet publish -c release src/WorkItemMigrator/JiraExport -o ./JiraExport

to build into a specific folder. I guess that would imply that one would need to adjust the publish flow for both tools.

@wallymathieu
Copy link
Contributor

wallymathieu commented Dec 31, 2023

This time it complains on a missing jira-export.dll, probably because for .net. we get more files than for .net than framework. Perhaps it would be better to add PublishSingleFile:
https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/overview?tabs=cli

On my machine that produces:
image

image

Those should files without extensions will have the extension exe on Windows.

Copy link

sonarqubecloud bot commented Jan 2, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@fabio-solidify fabio-solidify force-pushed the wallymathieu-upgrade-to-vs2017-format branch 2 times, most recently from a5521ca to 95afa45 Compare September 16, 2024 14:43
@fabio-solidify fabio-solidify force-pushed the wallymathieu-upgrade-to-vs2017-format branch from 95afa45 to 00b2c87 Compare September 16, 2024 14:47
@fabio-solidify fabio-solidify force-pushed the wallymathieu-upgrade-to-vs2017-format branch from 00b2c87 to dfb3c84 Compare September 16, 2024 15:14
@Alexander-Hjelm Alexander-Hjelm force-pushed the wallymathieu-upgrade-to-vs2017-format branch from d3c03bf to 256b6de Compare September 16, 2024 16:55
Copy link

@Alexander-Hjelm Alexander-Hjelm merged commit 6164f74 into master Sep 17, 2024
5 checks passed
@Alexander-Hjelm Alexander-Hjelm deleted the wallymathieu-upgrade-to-vs2017-format branch September 17, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants