Skip to content

Commit 1ecb197

Browse files
authored
Merge pull request dotnet#1152 from dotnet/dev15-rc3
Dev15 rc3
2 parents 4ee916d + a379fbe commit 1ecb197

File tree

22 files changed

+229
-92
lines changed

22 files changed

+229
-92
lines changed

build/Targets/VSL.Imports.targets

+30
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,36 @@
502502
</FilesToSign>
503503
</ItemGroup>
504504

505+
<Target Name="IncludeResourcesDllForSigning" AfterTargets="CopyFilesToOutputDirectory">
506+
<ItemGroup>
507+
<!-- Handle the resources dll if there are any -->
508+
<FilesToSign Condition="'$(ShouldSignBuild)' == 'true' AND '$(NonShipping)' != 'true' AND '$(ProjectSystemLayer)' != 'Dependency'" Include="$(OutDir)\**\$(AssemblyName).resources.dll">
509+
<Authenticode>Microsoft</Authenticode>
510+
<StrongName>$(StrongNameCertificateFriendlyId)</StrongName>
511+
</FilesToSign>
512+
</ItemGroup>
513+
</Target>
514+
515+
<!-- This target is similar to SatelliteDllsProjectOutputGroup except it includes path from the final output path rather than intermediate output path -->
516+
<Target Name="SatelliteDllsProjectOutputGroupWithFinalOutputPath"
517+
Returns="@(SatelliteDllsProjectOutputGroupWithFinalOutputPathOutput)"
518+
DependsOnTargets="$(SatelliteDllsProjectOutputGroupDependsOn)">
519+
520+
<ItemGroup>
521+
<SatelliteDllsProjectOutputGroupWithFinalOutputPathItem Include="$(OutputPath)%(EmbeddedResource.Culture)\$(TargetName).resources.dll"
522+
Condition="'%(WithCulture)' == 'true'">
523+
<TargetPath>%(EmbeddedResource.Culture)\$(TargetName).resources.dll</TargetPath>
524+
</SatelliteDllsProjectOutputGroupWithFinalOutputPathItem>
525+
</ItemGroup>
526+
527+
<!-- Convert intermediate items into final items; this way we can get the full path for each item. -->
528+
<ItemGroup>
529+
<SatelliteDllsProjectOutputGroupWithFinalOutputPathOutput Include="@(SatelliteDllsProjectOutputGroupWithFinalOutputPathItem->'%(FullPath)')">
530+
<OriginalItemSpec>%(SatelliteDllsProjectOutputGroupWithFinalOutputPathItem.Identity)</OriginalItemSpec>
531+
</SatelliteDllsProjectOutputGroupWithFinalOutputPathOutput>
532+
</ItemGroup>
533+
</Target>
534+
505535
<!-- ====================================================================================
506536
507537
Copying vsixmanifest to a separate folder

src/Dependencies/MSBuild/project.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"supports": { },
33
"dependencies": {
4-
"Microsoft.Build": "15.1.262-preview5",
5-
"Microsoft.Build.Framework": "15.1.262-preview5",
6-
"Microsoft.Build.Utilities.Core": "15.1.262-preview5",
7-
"Microsoft.Build.Tasks.Core": "15.1.262-preview5",
8-
"Microsoft.Build.Engine": "15.1.262-preview5",
4+
"Microsoft.Build": "15.1.0-preview-000516-03",
5+
"Microsoft.Build.Framework": "15.1.0-preview-000516-03",
6+
"Microsoft.Build.Utilities.Core": "15.1.0-preview-000516-03",
7+
"Microsoft.Build.Tasks.Core": "15.1.0-preview-000516-03",
8+
"Microsoft.Build.Engine": "15.1.0-preview-000516-03"
99
},
1010
"frameworks": {
1111
".NETFramework,Version=v4.6": { }

src/Microsoft.VisualStudio.ProjectSystem.CSharp.VS/Packaging/CSharpProjectSystemPackage.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
using Task = System.Threading.Tasks.Task;
1515

1616
// We register ourselves as a new CPS "project type"
17-
[assembly: ProjectTypeRegistration(projectTypeGuid: CSharpProjectSystemPackage.ProjectTypeGuid, displayName: "#1", displayProjectFileExtensions: "#2", defaultProjectExtension: "csproj", language: "CSharp", resourcePackageGuid: CSharpProjectSystemPackage.PackageGuid)]
17+
[assembly: ProjectTypeRegistration(projectTypeGuid: CSharpProjectSystemPackage.ProjectTypeGuid, displayName: "#1", displayProjectFileExtensions: "#2", defaultProjectExtension: "csproj", language: "CSharp", resourcePackageGuid: CSharpProjectSystemPackage.PackageGuid, Capabilities = ManagedProjectSystemPackage.DefaultCapabilities)]
1818

1919
namespace Microsoft.VisualStudio.Packaging
2020
{

src/Microsoft.VisualStudio.ProjectSystem.CSharp/ProjectSystem/SpecialFileProviders/CSharpAssemblyInfoSpecialFileProvider.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ internal class CSharpAssemblyInfoSpecialFileProvider : AbstractSpecialFileProvid
1414
public CSharpAssemblyInfoSpecialFileProvider(IPhysicalProjectTree projectTree,
1515
[Import(ExportContractNames.ProjectItemProviders.SourceFiles)] IProjectItemProvider sourceItemsProvider,
1616
[Import(AllowDefault = true)] Lazy<ICreateFileFromTemplateService> templateFileCreationService,
17-
IFileSystem fileSystem) :
18-
base(projectTree, sourceItemsProvider, templateFileCreationService, fileSystem)
17+
IFileSystem fileSystem,
18+
ISpecialFilesManager specialFilesManager)
19+
: base(projectTree, sourceItemsProvider, templateFileCreationService, fileSystem, specialFilesManager)
1920
{
2021
}
2122

src/Microsoft.VisualStudio.ProjectSystem.Managed.TestServices/Microsoft.VisualStudio.ProjectSystem.Managed.TestServices.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<Compile Include="ProjectSystem\ProjectTreeParser\Tokenizer.Token.cs" />
4545
<Compile Include="ProjectSystem\ProjectTreeParser\Tokenizer.TokenType.cs" />
4646
<Compile Include="ProjectSystem\ProjectTreePropertiesProviderExtensions.cs" />
47+
<Compile Include="ProjectSystem\ProjectTreeProvider.cs" />
4748
<Compile Include="ProjectSystem\ProjectTreeWriter.cs" />
4849
<Compile Include="ProjectSystem\ProjectTreeWriterOptions.cs" />
4950
<Compile Include="Workspaces\WorkspaceFactory.cs" />

src/Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests/Mocks/ProjectTreeProvider.cs renamed to src/Microsoft.VisualStudio.ProjectSystem.Managed.TestServices/ProjectSystem/ProjectTreeProvider.cs

+40-7
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,34 @@ namespace Microsoft.VisualStudio.ProjectSystem
1010
{
1111
internal class ProjectTreeProvider : IProjectTreeProvider
1212
{
13-
public NamedIdentity DataSourceKey => throw new NotImplementedException();
13+
public ProjectTreeProvider()
14+
{
15+
}
1416

15-
public IComparable DataSourceVersion => throw new NotImplementedException();
17+
public IReceivableSourceBlock<IProjectVersionedValue<IProjectTreeSnapshot>> Tree
18+
{
19+
get { throw new NotImplementedException(); }
20+
}
1621

17-
public IReceivableSourceBlock<IProjectVersionedValue<IProjectTreeSnapshot>> SourceBlock => throw new NotImplementedException();
22+
public IReceivableSourceBlock<IProjectVersionedValue<IProjectTreeSnapshot>> SourceBlock
23+
{
24+
get { throw new NotImplementedException(); }
25+
}
26+
27+
public NamedIdentity DataSourceKey
28+
{
29+
get { throw new NotImplementedException(); }
30+
}
1831

19-
public IReceivableSourceBlock<IProjectVersionedValue<IProjectTreeSnapshot>> Tree => throw new NotImplementedException();
32+
public IComparable DataSourceVersion
33+
{
34+
get { throw new NotImplementedException(); }
35+
}
2036

21-
ISourceBlock<IProjectVersionedValue<object>> IProjectValueDataSource.SourceBlock => throw new NotImplementedException();
37+
ISourceBlock<IProjectVersionedValue<object>> IProjectValueDataSource.SourceBlock
38+
{
39+
get { throw new NotImplementedException(); }
40+
}
2241

2342
public bool CanCopy(IImmutableSet<IProjectTree> nodes, IProjectTree receiver, bool deleteOriginal = false)
2443
{
@@ -37,7 +56,16 @@ public Task<bool> CanRenameAsync(IProjectTree node)
3756

3857
public IProjectTree FindByPath(IProjectTree root, string path)
3958
{
40-
throw new NotImplementedException();
59+
Requires.NotNull(root, nameof(root));
60+
Requires.NotNullOrEmpty(path, nameof(path));
61+
62+
foreach (IProjectTree child in root.GetSelfAndDescendentsBreadthFirst())
63+
{
64+
if (StringComparer.CurrentCultureIgnoreCase.Equals(child.FilePath, path))
65+
return child;
66+
}
67+
68+
return null;
4169
}
4270

4371
public string GetAddNewItemDirectory(IProjectTree target)
@@ -60,7 +88,12 @@ public IDisposable Join()
6088

6189
public Task RemoveAsync(IImmutableSet<IProjectTree> nodes, DeleteOptions deleteOptions = DeleteOptions.None)
6290
{
63-
throw new NotImplementedException();
91+
foreach (IProjectTree node in nodes)
92+
{
93+
node.Parent.Remove(node);
94+
}
95+
96+
return Task.CompletedTask;
6497
}
6598

6699
public Task RenameAsync(IProjectTree node, string value)

src/Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests/Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@
7474
<Compile Include="Mocks\IProjectTreeSnapshotFactory.cs" />
7575
<Compile Include="Mocks\IProjectVersionedValueFactory.cs" />
7676
<Compile Include="Mocks\IProjectAsynchronousTasksServiceFactory.cs" />
77+
<Compile Include="Mocks\ISpecialFilesManagerFactory.cs" />
7778
<Compile Include="Mocks\IWorkspaceProjectContextFactory.cs" />
7879
<Compile Include="Mocks\IUnconfiguredProjectServicesFactory.cs" />
79-
<Compile Include="Mocks\ProjectTreeProvider.cs" />
8080
<Compile Include="Mocks\PropertyPageData.cs" />
8181
<Compile Include="Mocks\IUnconfiguredProjectCommonServicesFactory.cs" />
8282
<Compile Include="Mocks\ProjectPropertiesFactory.cs" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
2+
3+
using Moq;
4+
using System;
5+
using System.Threading.Tasks;
6+
7+
namespace Microsoft.VisualStudio.ProjectSystem.SpecialFileProviders
8+
{
9+
internal class ISpecialFilesManagerFactory
10+
{
11+
public static ISpecialFilesManager ImplementGetFile(string result)
12+
{
13+
var mock = new Mock<ISpecialFilesManager>();
14+
mock.Setup(m => m.GetFileAsync(It.IsAny<SpecialFiles>(), It.IsAny<SpecialFileFlags>()))
15+
.ReturnsAsync(result);
16+
17+
return mock.Object;
18+
}
19+
20+
public static ISpecialFilesManager Create()
21+
{
22+
return Mock.Of<ISpecialFilesManager>();
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)