Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit53d92fb

Browse files
authored
Remove a couple of roadblocks in loading Fsharp.core projects (dotnet#2482)
1 parentd141c11 commit53d92fb

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

‎vsintegration/src/FSharp.ProjectSystem.Base/Project/HierarchyNode.cs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3044,7 +3044,6 @@ internal string GetTargetFrameworkMoniker()
30443044
internalstringGetProjectGuid()
30453045
{
30463046
stringguid=projectMgr.GetProjectProperty(ProjectFileConstants.ProjectGuid)asstring;
3047-
Debug.Assert(!String.IsNullOrEmpty(guid),"No project guid?");
30483047
returnguid;
30493048
}
30503049

‎vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs‎

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6129,17 +6129,32 @@ int IVsBuildPropertyStorage.SetPropertyValue(string propertyName, string configN
61296129
returnVSConstants.S_OK;
61306130
}
61316131

6132-
publicintUpgradeProject(uintgrfUpgradeFlags)
6132+
publicboolIsUsingMicrosoftNetSdk()
61336133
{
6134-
varhasTargetFramework=IsTargetFrameworkInstalled();
6135-
if(!hasTargetFramework)
6134+
// Nasty hack to see if we are using dotnet sdk, the SDK team will add a property in the future.
6135+
varc=GetProjectProperty("MSBuildAllProjects");
6136+
if(!string.IsNullOrWhiteSpace(c))
61366137
{
6137-
hasTargetFramework=ShowRetargetingDialog();
6138+
returnc.Contains("Microsoft.NET.Sdk.props");
61386139
}
6139-
// VSConstants.OLE_E_PROMPTSAVECANCELLED causes the shell to leave project unloaded
6140-
returnhasTargetFramework?VSConstants.S_OK:VSConstants.OLE_E_PROMPTSAVECANCELLED;
6140+
returnfalse;
61416141
}
61426142

6143+
publicintUpgradeProject(uintgrfUpgradeFlags)
6144+
{
6145+
if(!IsUsingMicrosoftNetSdk())
6146+
{
6147+
varhasTargetFramework=IsTargetFrameworkInstalled();
6148+
if(!hasTargetFramework)
6149+
{
6150+
hasTargetFramework=ShowRetargetingDialog();
6151+
}
6152+
// VSConstants.OLE_E_PROMPTSAVECANCELLED causes the shell to leave project unloaded
6153+
returnhasTargetFramework?VSConstants.S_OK:VSConstants.OLE_E_PROMPTSAVECANCELLED;
6154+
}
6155+
returnVSConstants.S_OK;
6156+
}
6157+
61436158
/// <summary>
61446159
/// Initialize projectNode
61456160
/// </summary>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp