Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit d1c0d54

Browse files
Try fixing build
1 parent b8396bd commit d1c0d54

File tree

6 files changed

+36
-33
lines changed

6 files changed

+36
-33
lines changed

Build/Program.cs

+7
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@
102102
.WithConfiguration(configuration)
103103
.Build());
104104

105+
Assertion.Succeed(
106+
new DotNetRestore()
107+
.WithProject(solutionFile)
108+
.WithDisableParallel(true)
109+
.WithProps(buildProps)
110+
.Build());
111+
105112
Assertion.Succeed(
106113
new DotNetBuild()
107114
.WithProject(solutionFile)

CSharpInteractive/CSharpInteractive.Tool.csproj

+12-14
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<UseAppHost>false</UseAppHost>
6+
<TargetFramework/>
67
<TargetFrameworks>$(Frameworks)</TargetFrameworks>
78
<AssemblyName>dotnet-csi</AssemblyName>
89
<IsPackable>true</IsPackable>
@@ -11,8 +12,6 @@
1112
<ProjectOutputPath>$(configuration)/$(MSBuildThisFileName)</ProjectOutputPath>
1213
<OutputPath>bin/$(ProjectOutputPath)</OutputPath>
1314
<IntermediateOutputPath>obj/$(ProjectOutputPath)/</IntermediateOutputPath>
14-
<PureDINamespace>CSharpInteractive</PureDINamespace>
15-
<CompilerGeneratedFilesOutputPath>$(CompilerGeneratedFilesOutputPath)/$(MSBuildThisFileName)</CompilerGeneratedFilesOutputPath>
1615
</PropertyGroup>
1716

1817
<PropertyGroup>
@@ -44,12 +43,8 @@
4443
</PackageReference>
4544
<PackageReference Include="TeamCity.ServiceMessages" Version="3.0.13" />
4645
<ProjectReference Include="..\CSharpInteractive.HostApi\CSharpInteractive.HostApi.csproj" PrivateAssets="all" />
47-
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
48-
<_Parameter1>CSharpInteractive.Tests</_Parameter1>
49-
</AssemblyAttribute>
50-
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
51-
<_Parameter1>DynamicProxyGenAssembly2</_Parameter1>
52-
</AssemblyAttribute>
46+
<InternalsVisibleTo Include="CSharpInteractive.Tests" />
47+
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
5348
<PackageReference Include="TeamCity.DotNet.Integration" Version="1.0.30" PrivateAssets="all" GeneratePathProperty="true" ExcludeAssets="All" IncludeAssets="none" />
5449
</ItemGroup>
5550

@@ -77,45 +72,48 @@
7772

7873
<Copy SourceFiles="@(MSBuildLoggerFiles)" DestinationFolder="$(OutDir)\msbuild" />
7974
<Copy SourceFiles="@(VSTestLoggerFiles)" DestinationFolder="$(OutDir)\vstest" />
75+
<Copy SourceFiles="@(MSBuildLoggerFiles)" DestinationFolder="$(MSBuildProjectDirectory)\bin\msbuild" />
76+
<Copy SourceFiles="@(VSTestLoggerFiles)" DestinationFolder="$(MSBuildProjectDirectory)\bin\vstest" />
8077
</Target>
8178

8279
<ItemGroup>
8380
<None Include="$(MSBuildProjectDirectory)\..\icon.png">
8481
<PackagePath>_common</PackagePath>
8582
<Pack>true</Pack>
83+
<Visible>false</Visible>
8684
</None>
8785

88-
<Content Include="$(PKGTeamCity_DotNet_Integration)\build\_common\msbuild15\*.*" Visible="false">
86+
<Content Include="$(MSBuildProjectDirectory)\bin\msbuild\*.*" Visible="false">
8987
<PackagePath>tools\net6.0\any\msbuild</PackagePath>
9088
<Pack>true</Pack>
9189
<Visible>false</Visible>
9290
</Content>
9391

94-
<Content Include="$(PKGTeamCity_DotNet_Integration)\build\_common\vstest15\*.*" Visible="false">
92+
<Content Include="$(MSBuildProjectDirectory)\bin\vstest\*.*" Visible="false">
9593
<PackagePath>tools\net6.0\any\vstest</PackagePath>
9694
<Pack>true</Pack>
9795
<Visible>false</Visible>
9896
</Content>
9997

100-
<Content Include="$(PKGTeamCity_DotNet_Integration)\build\_common\msbuild15\*.*" Visible="false">
98+
<Content Include="$(MSBuildProjectDirectory)\bin\msbuild\*.*" Visible="false">
10199
<PackagePath>tools\net7.0\any\msbuild</PackagePath>
102100
<Pack>true</Pack>
103101
<Visible>false</Visible>
104102
</Content>
105103

106-
<Content Include="$(PKGTeamCity_DotNet_Integration)\build\_common\vstest15\*.*" Visible="false">
104+
<Content Include="$(MSBuildProjectDirectory)\bin\vstest\*.*" Visible="false">
107105
<PackagePath>tools\net7.0\any\vstest</PackagePath>
108106
<Pack>true</Pack>
109107
<Visible>false</Visible>
110108
</Content>
111109

112-
<Content Include="$(PKGTeamCity_DotNet_Integration)\build\_common\msbuild15\*.*" Visible="false">
110+
<Content Include="$(MSBuildProjectDirectory)\bin\msbuild\*.*" Visible="false">
113111
<PackagePath>tools\net8.0\any\msbuild</PackagePath>
114112
<Pack>true</Pack>
115113
<Visible>false</Visible>
116114
</Content>
117115

118-
<Content Include="$(PKGTeamCity_DotNet_Integration)\build\_common\vstest15\*.*" Visible="false">
116+
<Content Include="$(MSBuildProjectDirectory)\bin\vstest\*.*" Visible="false">
119117
<PackagePath>tools\net8.0\any\vstest</PackagePath>
120118
<Pack>true</Pack>
121119
<Visible>false</Visible>

CSharpInteractive/CSharpInteractive.csproj

+10-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<!--suppress MsbuildTargetFrameworkTagInspection -->
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFramework />
4+
<TargetFramework/>
55
<TargetFrameworks>$(Frameworks)</TargetFrameworks>
66
<IsPackable>true</IsPackable>
77
<DefineConstants>$(DefineConstants);APPLICATION</DefineConstants>
88
<ProjectOutputPath>$(configuration)/$(MSBuildThisFileName)</ProjectOutputPath>
99
<OutputPath>bin/$(ProjectOutputPath)</OutputPath>
1010
<IntermediateOutputPath>obj/$(ProjectOutputPath)/</IntermediateOutputPath>
11-
<PureDINamespace>CSharpInteractive</PureDINamespace>
12-
<CompilerGeneratedFilesOutputPath>$(CompilerGeneratedFilesOutputPath)/$(MSBuildThisFileName)</CompilerGeneratedFilesOutputPath>
1311
</PropertyGroup>
1412

1513
<PropertyGroup>
@@ -40,12 +38,8 @@
4038
</PackageReference>
4139
<PackageReference Include="TeamCity.ServiceMessages" Version="3.0.13" />
4240
<ProjectReference Include="..\CSharpInteractive.HostApi\CSharpInteractive.HostApi.csproj" PrivateAssets="all" GeneratePathProperty="true" IncludeAssets="All" />
43-
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
44-
<_Parameter1>CSharpInteractive.Tests</_Parameter1>
45-
</AssemblyAttribute>
46-
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
47-
<_Parameter1>DynamicProxyGenAssembly2</_Parameter1>
48-
</AssemblyAttribute>
41+
<InternalsVisibleTo Include="CSharpInteractive.Tests" />
42+
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
4943
<PackageReference Include="TeamCity.DotNet.Integration" Version="1.0.30" PrivateAssets="all" GeneratePathProperty="true" ExcludeAssets="All" IncludeAssets="none" />
5044
</ItemGroup>
5145

@@ -67,12 +61,14 @@
6761

6862
<Target Name="GetDependencyTargetPaths">
6963
<ItemGroup>
70-
<MSBuildLoggerFiles Include="$(PKGTeamCity_Dotnet_Integration)\build\_common\msbuild15\*.*" />
71-
<VSTestLoggerFiles Include="$(PKGTeamCity_Dotnet_Integration)\build\_common\vstest15\*.*" />
64+
<MSBuildLoggerFiles Include="$(MSBuildProjectDirectory)\bin\msbuild\*.*" />
65+
<VSTestLoggerFiles Include="$(MSBuildProjectDirectory)\bin\vstest\*.*" />
7266
</ItemGroup>
7367

7468
<Copy SourceFiles="@(MSBuildLoggerFiles)" DestinationFolder="$(OutDir)\msbuild" />
7569
<Copy SourceFiles="@(VSTestLoggerFiles)" DestinationFolder="$(OutDir)\vstest" />
70+
<Copy SourceFiles="@(MSBuildLoggerFiles)" DestinationFolder="$(MSBuildProjectDirectory)\bin\msbuild" />
71+
<Copy SourceFiles="@(VSTestLoggerFiles)" DestinationFolder="$(MSBuildProjectDirectory)\bin\vstest" />
7672
</Target>
7773

7874
<Target DependsOnTargets="ResolveReferences" Name="CopyProjectReferencesToPackage">
@@ -85,15 +81,16 @@
8581
<Content Include="$(MSBuildProjectDirectory)\..\icon.png">
8682
<PackagePath>_common</PackagePath>
8783
<Pack>true</Pack>
84+
<Visible>false</Visible>
8885
</Content>
8986

90-
<None Include="$(PKGTeamCity_DotNet_Integration)\build\_common\msbuild15\*.*">
87+
<None Include="$(MSBuildProjectDirectory)\bin\msbuild\*.*">
9188
<PackagePath>build\any\msbuild</PackagePath>
9289
<Pack>true</Pack>
9390
<Visible>false</Visible>
9491
</None>
9592

96-
<None Include="$(PKGTeamCity_DotNet_Integration)\build\_common\vstest15\*.*">
93+
<None Include="$(MSBuildProjectDirectory)\bin\vstest\*.*">
9794
<PackagePath>build\any\vstest</PackagePath>
9895
<Pack>true</Pack>
9996
<Visible>false</Visible>

CSharpInteractive/Composition.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,10 @@ private void Setup()
174174
.Bind<SourceReferenceResolver>().As(Lifetime.Transient).To<SourceResolver>()
175175
.Bind<MetadataReferenceResolver>().As(Lifetime.Transient).To<MetadataResolver>()
176176
.Bind<IScriptContentReplacer>().To<ScriptContentReplacer>()
177-
.Bind<ITextReplacer>().To<TextReplacer>()
177+
.Bind<ITextReplacer>().To<TextReplacer>();
178178

179+
DI.Setup(nameof(Composition))
180+
.DefaultLifetime(Lifetime.Singleton)
179181
// Script options factory
180182
.Bind<ISettingGetter<LanguageVersion>>().Bind<ISettingSetter<LanguageVersion>>().To(_ => new Setting<LanguageVersion>(LanguageVersion.Default))
181183
.Bind<ISettingGetter<OptimizationLevel>>().Bind<ISettingSetter<OptimizationLevel>>().To(_ => new Setting<OptimizationLevel>(OptimizationLevel.Release))

Directory.Build.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<Authors>NikolayP</Authors>
1010
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1111
<PackageProjectUrl>https://github.com/DevTeam/csharp-interactive</PackageProjectUrl>
12-
<Company>NikolayP</Company>
13-
<Copyright>$(Company) 2022</Copyright>
12+
<Company>Nikolay Pianikov</Company>
13+
<Copyright>Copyright (C) $([System.DateTime]::Now.Year) $(Company)</Copyright>
1414
<RepositoryType>git</RepositoryType>
1515
<RepositoryUrl>https://github.com/DevTeam/csharp-interactive</RepositoryUrl>
1616
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>

global.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"sdk": {
3-
"version": "7.0",
4-
"rollForward": "latestMajor",
5-
"allowPrerelease": true
3+
"version": "8.0.100",
4+
"rollForward": "latestMajor"
65
}
76
}

0 commit comments

Comments
 (0)