diff --git a/build.cmd b/build.cmd index f61b0da..2c7d5db 100644 --- a/build.cmd +++ b/build.cmd @@ -4,7 +4,7 @@ if "%config%" == "" ( set config=Release ) -set version=2016.1.0 +set version=2016.2.0 if not "%PackageVersion%" == "" ( set version=%PackageVersion% ) @@ -19,4 +19,4 @@ if "%nuget%" == "" ( set package_id="ReSharper.InternalsVisibleTo" -%nuget% pack "src\ReSharper.InternalsVisibleTo.nuspec" -NoPackageAnalysis -Version %version% -Properties "Configuration=%config%;ReSharperDep=Wave;ReSharperVer=[5.0];PackageId=%package_id%" \ No newline at end of file +%nuget% pack "src\ReSharper.InternalsVisibleTo.nuspec" -NoPackageAnalysis -Version %version% -Properties "Configuration=%config%;ReSharperDep=Wave;ReSharperVer=[6.0];PackageId=%package_id%" \ No newline at end of file diff --git a/src/ReSharper.InternalsVisibleTo.sln.DotSettings b/src/ReSharper.InternalsVisibleTo.sln.DotSettings index 963ef02..6f48901 100644 --- a/src/ReSharper.InternalsVisibleTo.sln.DotSettings +++ b/src/ReSharper.InternalsVisibleTo.sln.DotSettings @@ -96,6 +96,7 @@ True True True + True True <data><IncludeFilters /><ExcludeFilters /></data> <data /> \ No newline at end of file diff --git a/src/ReSharper.InternalsVisibleTo/ProjectReferenceLookupItem.cs b/src/ReSharper.InternalsVisibleTo/ProjectReferenceLookupItem.cs index 22a56f2..fa8366f 100644 --- a/src/ReSharper.InternalsVisibleTo/ProjectReferenceLookupItem.cs +++ b/src/ReSharper.InternalsVisibleTo/ProjectReferenceLookupItem.cs @@ -2,6 +2,7 @@ using System.Drawing; using System.Text; using JetBrains.DocumentModel; +using JetBrains.Metadata.Reader.API; using JetBrains.ProjectModel; using JetBrains.ReSharper.Feature.Services.CodeCompletion.Infrastructure.LookupItems.Impl; using JetBrains.ReSharper.Feature.Services.Lookup; @@ -62,7 +63,7 @@ private static string GetCompleteText(IProject project) private static string GetProjectDisplayName(IProject project) { - return project.GetOutputAssemblyName(); + return project.GetOutputAssemblyName(TargetFrameworkId.Default); } private static string GetPublicKeyString(IProject project) @@ -70,7 +71,7 @@ private static string GetPublicKeyString(IProject project) var solution = project.GetSolution(); var snkProvider = solution.GetComponent(); - byte[] data = snkProvider.ProjectDataCache.GetData(snkProvider, project.ProjectFileLocation, null); + byte[] data = snkProvider.ProjectDataCache.GetData(snkProvider, project.ProjectFileLocation, null); return data?.Length > 0 ? (SnkDataProvider.IsPublicKeyBlob(data) ? StringUtil.ToHexString(data) : null) : null; diff --git a/src/ReSharper.InternalsVisibleTo/ReSharper.InternalsVisibleTo.csproj b/src/ReSharper.InternalsVisibleTo/ReSharper.InternalsVisibleTo.csproj index c1ab862..2cdbb88 100644 --- a/src/ReSharper.InternalsVisibleTo/ReSharper.InternalsVisibleTo.csproj +++ b/src/ReSharper.InternalsVisibleTo/ReSharper.InternalsVisibleTo.csproj @@ -54,6 +54,10 @@ ..\packages\AsyncBridge.JetBrains.0.1.1.0\lib\net40-Client\AsyncBridge.dll True + + ..\packages\AsyncIO.0.1.18.0\lib\net40\AsyncIO.dll + True + ..\packages\xmlrpcnet.2.5.0\lib\net20\CookComputing.XmlRpcV2.dll True @@ -82,10 +86,11 @@ ..\packages\DotNetZip.Reduced.1.9.1.8\lib\net20\Ionic.Zip.Reduced.dll True - - ..\packages\JetBrains.Annotations.10.1.4\lib\net20\JetBrains.Annotations.dll + + ..\packages\JetBrains.Annotations.10.1.5\lib\net\JetBrains.Annotations.dll True + ..\packages\JetBrains.Platform.Lib.Microsoft.Deployment.Compression.Cab.2.0.20140304.0\lib\Microsoft.Deployment.Compression.dll True @@ -94,14 +99,6 @@ ..\packages\JetBrains.Platform.Lib.Microsoft.Deployment.Compression.Cab.2.0.20140304.0\lib\Microsoft.Deployment.Compression.Cab.dll True - - ..\packages\JetBrains.Platform.Lib.Microsoft.Deployment.WindowsInstaller.2.0.20140821.0\lib\Microsoft.Deployment.WindowsInstaller.dll - True - - - ..\packages\JetBrains.Platform.Lib.VisualStudio.AnyVs.ShellInterop.PrivateBuild.2.0.20140304.0\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - ..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll True @@ -118,12 +115,112 @@ ..\packages\JetBrains.Mono.Posix.0.1\lib\net40\Mono.Posix.dll True + + ..\packages\NetMQ.3.3.3.1\lib\net40\NetMQ.dll + True + ..\packages\Newtonsoft35.Json.7.0.1\lib\net35\Newtonsoft.Json.dll True - - ..\packages\NuGet.Core.2.10.1\lib\net40-Client\NuGet.Core.dll + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Client.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Commands.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Common.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Configuration.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.ContentModel.dll + True + + + ..\packages\NuGet.Core.2.12.0\lib\net40-Client\NuGet.Core.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.DependencyResolver.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.DependencyResolver.Core.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Frameworks.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.LibraryModel.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Logging.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.PackageManagement.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Packaging.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Packaging.Core.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Packaging.Core.Types.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.ProjectManagement.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.ProjectModel.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Protocol.Core.Types.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Protocol.Core.v2.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Protocol.Core.v3.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Protocol.VisualStudio.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Repositories.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Resolver.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.RuntimeModel.dll + True + + + ..\packages\NuGet.Core.Ultimate.3.3.2\lib\net45\NuGet.Versioning.dll True @@ -140,8 +237,18 @@ True + + + + + + + + + + ..\packages\JetBrains.Platform.Lib.System.Windows.Interactivity.2.0.20140318.0\lib\System.Windows.Interactivity.dll True @@ -188,6 +295,7 @@ + @@ -200,40 +308,34 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ReSharper.InternalsVisibleTo/SnkDataProvider.cs b/src/ReSharper.InternalsVisibleTo/SnkDataProvider.cs index 61b722a..3af918e 100644 --- a/src/ReSharper.InternalsVisibleTo/SnkDataProvider.cs +++ b/src/ReSharper.InternalsVisibleTo/SnkDataProvider.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; using System.Xml; @@ -12,19 +13,29 @@ namespace ReSharper.InternalsVisibleTo { [SolutionInstanceComponent] - internal class SnkDataProvider : IProjectFileDataCache + internal class SnkDataProvider : IProjectFileDataProvider { [NotNull] - public ProjectFileDataCache ProjectDataCache { get; } + public ProjectFileDataCacheImpl ProjectDataCache { get; } - public SnkDataProvider([NotNull] Lifetime lifetime, [NotNull] ProjectFileDataCache projectDataCache) + public SnkDataProvider([NotNull] Lifetime lifetime, [NotNull] ProjectFileDataCacheImpl projectDataCache) { ProjectDataCache = projectDataCache; projectDataCache.RegisterCache(lifetime, this); } - public object Read(BinaryReader reader) + private FileSystemPath currentProjectPath; + + public bool CanHandle(FileSystemPath projectFileLocation) + { + currentProjectPath = projectFileLocation; + return true; + } + + public int Version { get; } + + public byte[] Read(FileSystemPath projectFileLocation, BinaryReader reader) { int length = reader.ReadInt32(); if (length == 0) @@ -32,22 +43,14 @@ public object Read(BinaryReader reader) return reader.ReadBytes(length); } - public void Write(BinaryWriter writer, object data) + public void Write(FileSystemPath projectFileLocation, BinaryWriter writer, byte[] data) { - var bytes = (byte[])data; + var bytes = data; writer.Write(bytes.Length); writer.Write(bytes); } - private FileSystemPath currentProjectPath; - - public bool CanHandle(FileSystemPath projectFileLocation) - { - currentProjectPath = projectFileLocation; - return true; - } - - public object BuildData(XmlDocument document) + public byte[] BuildData(FileSystemPath projectFileLocation, XmlDocument document) { string keyContainer = ExtractPublicKeyFile(document); if (!string.IsNullOrWhiteSpace(keyContainer)) @@ -59,6 +62,11 @@ public object BuildData(XmlDocument document) return EmptyArray.Instance; } + public Action OnDataChanged(FileSystemPath projectFileLocation, byte[] oldData, byte[] newData) + { + return null; + } + private static string ExtractPublicKeyFile(XmlDocument document) { XmlElement documentElement = document.DocumentElement; @@ -155,12 +163,5 @@ private IClrStrongName GetStrongNameInterface() { return ClrStrongName.GetInstance(); } - - public Action OnDataChanged(FileSystemPath projectFileLocation, object oldData, object newData) - { - return null; - } - - public int Version => 0; } -} \ No newline at end of file +} diff --git a/src/ReSharper.InternalsVisibleTo/app.config b/src/ReSharper.InternalsVisibleTo/app.config new file mode 100644 index 0000000..3d025da --- /dev/null +++ b/src/ReSharper.InternalsVisibleTo/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/ReSharper.InternalsVisibleTo/packages.config b/src/ReSharper.InternalsVisibleTo/packages.config index fe27428..8dbcb71 100644 --- a/src/ReSharper.InternalsVisibleTo/packages.config +++ b/src/ReSharper.InternalsVisibleTo/packages.config @@ -3,50 +3,45 @@ + - + - + - - - - - + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - + + - - +