Unable to create new projects or load old projects

I’m on
Windows 10
Xenko 2.0.3.1
Visual Studio 2017 Community Edition Stable
Visual Studio 2017 Community Edition Preview 7.0 (15.3)
Xenko Visual Studio Plugins installed without any problems

I am unable create new project or load existing ones.

When creating a “New game”, using all the default settings, I get the following exception

Verbose: Loading Assets from Package [Xenko.xkpkg]
Verbose: Loading Assets from Package [MyGame.xkpkg]
Verbose: Generating MyGame.Game…
Verbose: Generating MyGame.Windows…
Error: An exception occurred while generating the template… Microsoft.Build.Exceptions.InvalidProjectFileException: The tools version “15.0” is unrecognized. Available tools versions are “2.0”, “3.5”, “4.0”. C:\Users-----\code\xenko-projects\MyGame\MyGame\MyGame.Game\MyGame.Game.csproj
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
at Microsoft.Build.Evaluation.Project.Data.InitializeForEvaluation(IToolsetProvider toolsetProvider)
at Microsoft.Build.Evaluation.Evaluator4..ctor(IEvaluatorData4 data, ProjectRootElement projectRootElement, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary1 environmentProperties, ILoggingService loggingService, IItemFactory2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCache projectRootElementCache, BuildEventContext buildEventContext, ProjectInstance projectInstanceIfAnyForDebuggerOnly)
at Microsoft.Build.Evaluation.Project.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings)
at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings)
at Microsoft.Build.Evaluation.Project.Initialize(IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings) at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings)
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary2 globalProperties, String toolsVersion) at SiliconStudio.Assets.VSProjectHelper.LoadProject(String fullProjectLocation, String configuration, String platform, Dictionary2 extraProperties) in C:\TeamCity\work\80a49494ba341a6a\sources\assets\SiliconStudio.Assets\VSProjectHelper.cs:line 200
at SiliconStudio.Assets.Package.FindAssetsInProject(String projectFullPath, String& nameSpace) in C:\TeamCity\work\80a49494ba341a6a\sources\assets\SiliconStudio.Assets\Package.cs:line 1380
at SiliconStudio.Assets.Package.FindAssetsInProject(ICollection1 list, Package package) in C:\TeamCity\work\80a49494ba341a6a\sources\assets\SiliconStudio.Assets\Package.cs:line 1407 at SiliconStudio.Assets.Package.ListAssetFiles(ILogger log, Package package, Boolean listAssetsInMsbuild, Nullable1 cancelToken) in C:\TeamCity\work\80a49494ba341a6a\sources\assets\SiliconStudio.Assets\Package.cs:line 1374
at SiliconStudio.Assets.Package.LoadTemporaryAssets(ILogger log, List1 assetFiles, Nullable1 cancelToken, Boolean listAssetsInMsbuild, Func2 filterFunc) in C:\TeamCity\work\80a49494ba341a6a\sources\assets\SiliconStudio.Assets\Package.cs:line 967 at SiliconStudio.Xenko.Assets.Presentation.Templates.NewGameTemplateGenerator.Generate(SessionTemplateGeneratorParameters parameters) in C:\TeamCity\work\80a49494ba341a6a\sources\editor\SiliconStudio.Xenko.Assets.Presentation\Templates\NewGameTemplateGenerator.cs:line 166 at SiliconStudio.Assets.Editor.Components.TemplateDescriptions.SessionTemplateGenerator.Run(SessionTemplateGeneratorParameters parameters) in C:\TeamCity\work\80a49494ba341a6a\sources\editor\SiliconStudio.Assets.Editor\Components\TemplateDescriptions\SessionTemplateGenerator.cs:line 41 at SiliconStudio.Assets.Editor.Components.TemplateDescriptions.TemplateGeneratorHelper.<>c__DisplayClass0_01.b__0() in C:\TeamCity\work\80a49494ba341a6a\sources\editor\SiliconStudio.Assets.Editor\Components\TemplateDescriptions\TemplateGeneratorHelper.cs:line 56

thanks for the help

Having more than one install of Visual Studio (in your case stable and preview) is known to cause issues.

Unfortunately uninstalling one might not be enough to fix the issue (registry keys and path still messed up). Try first to un install the preview and if it doesn’t fix it, repair the stable one.

Make sure you also don’t have a separate install of MS Build Tools as this might also cause conflicts.

i was hoping that wasn’t the case. i’ll try it and update this thread. thanks for the reply

Uninstalling and repair, unfortunately did not fix the problem. I’m still unable to create projects with Xenko

I uninstalled the preview version of VS, I repaired the remaining stable version and the repair failed. I uninstalled the stable version and could not reinstall it without errors. I reinstalled the preview version which installed correctly but my problem continues.

Any suggestions?

Well, if installing the normal version failed. It definitely means that something is broken on your machine. I suggest you also report this issue to Microsoft. It happened to me once and I filled a report (did not get much feedback after that though). Then to fix it I had to track down any files/registry key that seemed related. I never installed any preview product from Microsoft ever since (I also withdraw from the slow insider preview program after having issues with Windows 10).

We don’t officially support preview versions even though I feel like the current issue is elsewhere. Installing on a new machine (or VM) does work for me. We do use Microsoft APIs to retrieve what versions of MSBuild are available on a machine and currently we require at least 15. I’m afraid their own API don’t work well with side-by-side installs and previews.

using microsoft’s visual studio install cleaner mentioned in this link, let me reinstall the visual studio stable version without any errors

https://developercommunity.visualstudio.com/content/problem/32386/microsoft-visual-studio-2017-fails-to-uninstall.html

at first this did not help, at least not until uninstalling and reinstalling Xenko

I am now able to create new projects, thanks

2 Likes

Good to know. Thanks for sharing the link. :+1:

Looks like the issue is definitely on Microsoft side. See https://github.com/Microsoft/msbuild/issues/2427 and https://github.com/Microsoft/msbuild/issues/2369.

We have some VMs when we try the Xenko installer to make sure it works fine with a proper installation. It was working without issue before the release of 15.3. And now it is broken (even for me I actually updated my own Visual Studio to 15.3 and I can’t build projects anymore).

do you have any plans to support 15.3?

That’s not the issue. It should already work but Microsoft messed up and broke their own API. Until they fix it there is not much we can do.
I’ll try to find a workaround in the following days but no guarantee.

2 Likes

Maybe i’m misunderstanding, but in the first thread, you refer to above, AndyGerlicher says this change is by design and their remedy is to update documentation to reflect the changes. He also refers to the msbuild app.config file where the toolset versions now exist. If this is correct it seems that re-coding this functionality might be needed. Maybe the api you relied on worked before 15.3 but now they seem to be adhering to a new contract, even though they intended it for all of 2017. Again, I maybe misunderstanding his reply.

I really appreciate you being on top of this so far. I’m really looking forward to getting xenko working. I have since removed the previous version ov Visual Studio, because 15.3 has been officially released. Please keep me up-to-date when everything is working again. Thanks

1 Like

That is how I understand the API change too. That they are changing it, so Xenko needs to be updated to reflect this change.
I can still build using Visual Studio 2017 15.3, but when I open it in Xenko there are errors all over.

Version 2.0.4.1 released with a fix that should prevent this issue.

1 Like

confirmed 2.0.4.1 now let’s me create new projects without any issues i’m now using version 15.3.2 Visual Studio CE