Skip to content

Commit

Permalink
Merge pull request dotnet#21991 from tannergooding/nuspec
Browse files Browse the repository at this point in the history
Updating some nuspec to list the correct framework requirements and dependencies.
  • Loading branch information
tannergooding authored Sep 12, 2017
2 parents b894a2a + 689ecc2 commit bcae709
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 45 deletions.
3 changes: 1 addition & 2 deletions build/Targets/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@
<MicrosoftVisualStudioProjectSystemVersion>15.3.178-pre-g209fb07c2e</MicrosoftVisualStudioProjectSystemVersion>
<MicrosoftVisualStudioQualityToolsUnitTestFrameworkVersion>10.0.0.0-alpha</MicrosoftVisualStudioQualityToolsUnitTestFrameworkVersion>
<MicrosoftVisualStudioRemoteControlVersion>14.0.249-master2E2DC10C</MicrosoftVisualStudioRemoteControlVersion>
<MicrosoftVisualStudioSetupConfigurationInteropVersion>1.3.269-rc</MicrosoftVisualStudioSetupConfigurationInteropVersion>
<MicrosoftVisualStudioSetupConfigurationNativex86Version>1.3.269-rc</MicrosoftVisualStudioSetupConfigurationNativex86Version>
<MicrosoftVisualStudioSetupConfigurationInteropVersion>1.11.2290</MicrosoftVisualStudioSetupConfigurationInteropVersion>
<MicrosoftVisualStudioSettings140Version>14.3.25407</MicrosoftVisualStudioSettings140Version>
<MicrosoftVisualStudioShell140Version>14.3.25407</MicrosoftVisualStudioShell140Version>
<MicrosoftVisualStudioShell150Version>15.0.26606</MicrosoftVisualStudioShell150Version>
Expand Down
2 changes: 1 addition & 1 deletion src/NuGet/Microsoft.Net.CSharp.Interactive.netcore.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<projectUrl>$projectUrl$</projectUrl>
<tags>$tags$</tags>
<dependencies>
<group targetFramework="NETCoreApp1.0">
<group targetFramework="netcoreapp1.1">
<dependency id="Microsoft.CodeAnalysis.Compilers" version="$version$" />
<dependency id="Microsoft.CodeAnalysis.Scripting" version="$version$" />
<dependency id="NETStandard.Library" version="1.6.0" />
Expand Down
4 changes: 2 additions & 2 deletions src/NuGet/Microsoft.Net.Compilers.netcore.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<tags>$tags$</tags>
<serviceable>true</serviceable>
<dependencies>
<group targetFramework="netcoreapp1.0">
<group targetFramework="netcoreapp2.0">
<dependency id="Microsoft.CodeAnalysis.Compilers" version="[$version$]" />
<dependency id="System.AppContext" version="$SystemAppContextVersion$" />
<dependency id="System.Diagnostics.Process" version="$SystemDiagnosticsProcessVersion$" />
Expand All @@ -29,7 +29,7 @@
</dependencies>
</metadata>
<files>
<file src="$emptyDirPath$/_._" target="ref/netcoreapp1.0" />
<file src="$emptyDirPath$/_._" target="ref/netcoreapp2.0" />
<file src="Exes/CscCore/csc.dll" target="runtimes/any/native" />
<file src="Exes/VbcCore/vbc.dll" target="runtimes/any/native" />
</files>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
<tags>$tags$</tags>
<dependencies>
<dependency id="Microsoft.VisualStudio.LanguageServices" version="$version$" />
<dependency id="Microsoft.VisualStudio.Setup.Configuration.Interop" version="1.3.269-rc" />
<dependency id="Microsoft.VisualStudio.Setup.Configuration.Native.x86" version="1.3.269-rc" />
<dependency id="Microsoft.VisualStudio.Setup.Configuration.Interop" version="$MicrosoftVisualStudioSetupConfigurationInteropVersion$" />
<dependency id="System.Diagnostics.Process" version="$SystemDiagnosticsProcessVersion$" />
</dependencies>
</metadata>
<files>
<file src="Dlls\TestUtilities\net461\Roslyn.Test.Utilities.dll" target="lib\net46" />
<file src="Dlls\VisualStudioIntegrationTestUtilities\Microsoft.VisualStudio.IntegrationTest.Utilities.dll" target="lib\net46" />
<file src="Dlls\ServicesTestUtilities\Roslyn.Services.Test.Utilities.dll" target="lib\net46" />
<file src="Dlls\TestUtilities\net461\Roslyn.Test.Utilities.dll" target="lib\net461" />
<file src="Dlls\VisualStudioIntegrationTestUtilities\Microsoft.VisualStudio.IntegrationTest.Utilities.dll" target="lib\net461" />
<file src="Dlls\ServicesTestUtilities\Roslyn.Services.Test.Utilities.dll" target="lib\net461" />
</files>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@ internal static class NativeMethods
private const string Kernel32 = "kernel32.dll";
private const string Ole32 = "ole32.dll";
private const string User32 = "User32.dll";
private const string SetupConfigurationNative = "x86\\Microsoft.VisualStudio.Setup.Configuration.Native.dll";

#region Microsoft.VisualStudio.Setup.Configuration.Native.dll

public const int REGDB_E_CLASSNOTREG = unchecked((int)0x80040154);

[DllImport(SetupConfigurationNative, BestFitMapping = false, CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode, EntryPoint = "GetSetupConfiguration", ExactSpelling = true, PreserveSig = true, SetLastError = false, ThrowOnUnmappableChar = false)]
public static extern int GetSetupConfiguration(
[Out, MarshalAs(UnmanagedType.Interface)] out ISetupConfiguration setupConfiguration,
[In] IntPtr pReserved
);

#endregion

#region kernel32.dll

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,29 +197,9 @@ private void UpdateCurrentlyRunningInstance(ImmutableHashSet<string> requiredPac
_currentlyRunningInstance = new VisualStudioInstance(hostProcess, dte, supportedPackageIds, installationPath);
}

private static ISetupConfiguration GetSetupConfiguration()
{
try
{
return new SetupConfiguration();
}
catch (COMException comException) when (comException.HResult == NativeMethods.REGDB_E_CLASSNOTREG)
{
// Fallback to P/Invoke if the COM registration is missing
var hresult = NativeMethods.GetSetupConfiguration(out var setupConfiguration, pReserved: IntPtr.Zero);

if (hresult < 0)
{
throw Marshal.GetExceptionForHR(hresult);
}

return setupConfiguration;
}
}

private static IEnumerable<ISetupInstance> EnumerateVisualStudioInstances()
{
var setupConfiguration = GetSetupConfiguration() as ISetupConfiguration2;
var setupConfiguration = new SetupConfiguration();

var instanceEnumerator = setupConfiguration.EnumAllInstances();
var instances = new ISetupInstance[3];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
<PackageReference Include="Microsoft.VisualStudio.OLE.Interop" Version="$(MicrosoftVisualStudioOLEInteropVersion)" />
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem" Version="$(MicrosoftVisualStudioProjectSystemVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="$(MicrosoftVisualStudioSetupConfigurationInteropVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Native.x86" Version="$(MicrosoftVisualStudioSetupConfigurationNativex86Version)" />
<PackageReference Include="Microsoft.VisualStudio.Shell.15.0" Version="$(MicrosoftVisualStudioShell150Version)" />
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop" Version="$(MicrosoftVisualStudioShellInteropVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop.8.0" Version="$(MicrosoftVisualStudioShellInterop80Version)" />
Expand Down

0 comments on commit bcae709

Please sign in to comment.