microsoft / WinObjC

Objective-C for Windows
MIT License
6.24k stars 809 forks source link

[VS 15.7] NuGet TFM issue when building from source #2877

Open schriftgestalt opened 6 years ago

schriftgestalt commented 6 years ago

When I run this command:

.\.tools\nuget.exe restore .\build\build.sln

I get the following error:

WinObjC> .\.tools\nuget.exe restore .\build\build.sln
MSBuild auto-detection: using msbuild version '15.7.177.53362' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin'.
Invalid restore input. Invalid target framework 'unsupported'. Input files: C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks.Core\WinObjC.Frameworks.Core.nuproj.

I’m running this in a fresh install of Windows10.

schriftgestalt commented 6 years ago

I tired to checkout an older version an not I get a lot of this:

jC.Frameworks.UWP.nuproj]
MSBUILD : warning :    at GitVersion.GitVersionFinder.EnsureHeadIsNotDetached(GitVersionContext context) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks.UWP\WinObjC.Frameworks.UWP.nuproj]
MSBUILD : warning :    at GitVersion.GitVersionFinder.FindVersion(GitVersionContext context) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks.UWP\WinObjC.Frameworks.UWP.nuproj]
MSBUILD : warning :    at GitVersion.ExecuteCore.<>c__DisplayClass6_0.<ExecuteInternal>b__0(IRepository repo) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks.UWP\WinObjC.Frameworks.UWP.nuproj]
MSBUILD : warning :    at GitVersion.GitPreparer.WithRepository[TResult](Func`2 action) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks.UWP\WinObjC.Frameworks.UWP.nuproj]
MSBUILD : warning :    at GitVersion.ExecuteCore.ExecuteInternal(String targetBranch, String commitId, GitPreparer gitPreparer, IBuildServer buildServer, Config overrideConfig) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks.UWP\WinObjC.Frameworks.UWP.nuproj]
MSBUILD : warning :    at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId, Config overrideConfig, Boolean noCache) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks.UWP\WinObjC.Frameworks.UWP.nuproj]
MSBUILD : warning :    at GitVersion.ExecuteCore.TryGetVersion(String directory, VersionVariables& versionVariables, Boolean noFetch, Authentication authentication) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks.UWP\WinObjC.Frameworks.UWP.nuproj]
C:\Users\IEUser\Documents\WinObjC\common\winobjc.versioning.common.targets(34,5): error : Cannot calculate version. Please make sure either PackageVersionOverride is set or GitVersionTask is listed as a nuget dependency for this project and that git.exe is part of the PATH environment variable. [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks.UWP\WinObjC.Frameworks.UWP.nuproj]
MSBUILD : warning : WARN [05/21/18 12:53:39:41] Could not determine assembly version: System.ComponentModel.WarningException: It looks like the branch being examined is a detached Head pointing to commit 'aea5958'. Without a proper branch name GitVersion cannot determine the build version. [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks\WinObjC.Frameworks.nuproj]
MSBUILD : warning :    at GitVersion.GitVersionFinder.EnsureHeadIsNotDetached(GitVersionContext context) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks\WinObjC.Frameworks.nuproj]
MSBUILD : warning :    at GitVersion.GitVersionFinder.FindVersion(GitVersionContext context) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks\WinObjC.Frameworks.nuproj]
MSBUILD : warning :    at GitVersion.ExecuteCore.<>c__DisplayClass6_0.<ExecuteInternal>b__0(IRepository repo) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks\WinObjC.Frameworks.nuproj]
MSBUILD : warning :    at GitVersion.GitPreparer.WithRepository[TResult](Func`2 action) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks\WinObjC.Frameworks.nuproj]
MSBUILD : warning :    at GitVersion.ExecuteCore.ExecuteInternal(String targetBranch, String commitId, GitPreparer gitPreparer, IBuildServer buildServer, Config overrideConfig) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks\WinObjC.Frameworks.nuproj]
MSBUILD : warning :    at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId, Config overrideConfig, Boolean noCache) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks\WinObjC.Frameworks.nuproj]
MSBUILD : warning :    at GitVersion.ExecuteCore.TryGetVersion(String directory, VersionVariables& versionVariables, Boolean noFetch, Authentication authentication) [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks\WinObjC.Frameworks.nuproj]
C:\Users\IEUser\Documents\WinObjC\common\winobjc.versioning.common.targets(34,5): error : Cannot calculate version. Please make sure either PackageVersionOverride is set or GitVersionTask is listed as a nuget dependency for this project and that git.exe is part of the PATH environment variable. [C:\Users\IEUser\Documents\WinObjC\build\WinObjC.Frameworks\WinObjC.Frameworks.nuproj]
schriftgestalt commented 6 years ago

Can anyone please help me with this. I would love to work on this.

DHowett-MSFT commented 6 years ago

@schriftgestalt Thanks for trying this, and one of our older versions. We've been having some trouble with NuGet lately. Can you try restoring using MSBuild from a Developer Command Prompt?

msbuild /t:Restore /p:BuildProjectReferences=false .\tools\tools.sln
msbuild /t:Restore /p:BuildProjectReferences=false .\build\build.sln

You might find you have better luck with this method. If you do, you may need to turn off automatic package restore inside Visual Studio before building any of the frameworks, and perhaps even unload the NugetRestore project.

Thanks!

schriftgestalt commented 6 years ago

This works. Thanks.

Now I have another problem (a lot of those errors):

Error | C1083 | Cannot open include file: 'ErrorHandling.h': No such file or directory | StarboardLib | \rawbuffer.cpp | 18 |