@@ -98,72 +98,6 @@ class TestFixture {
9898 expect ( contents ) . toContain ( 'dotnet_6_and_7.deps.json' ) ;
9999 } ) ;
100100
101- it ( 'publishes correctly when a .NET project includes a lockfile' , async ( ) => {
102- const fixtures : types . DotNetFile [ ] = [
103- {
104- name : 'program.cs' ,
105- contents : `
106- using System;
107- class TestFixture {
108- static public void Main(String[] args)
109- {
110- var client = new System.Net.Http.HttpClient();
111- Console.WriteLine("Hello, World!");
112- }
113- }
114- ` ,
115- } ,
116- {
117- name : 'testproject.csproj' ,
118- contents : `
119- <Project Sdk="Microsoft.NET.Sdk">
120-
121- <PropertyGroup>
122- <OutputType>Exe</OutputType>
123- <TargetFramework>net7.0</TargetFramework>
124- <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
125- <RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
126- </PropertyGroup>
127-
128- <ItemGroup>
129- <PackageReference Include="Newtonsoft.Json" Version="12.*" />
130- </ItemGroup>
131-
132- </Project>
133- ` ,
134- } ,
135- {
136- name : 'packages.lock.json' ,
137- contents : `
138- {
139- "version": 1,
140- "dependencies": {
141- "net7.0": {
142- "Newtonsoft.Json": {
143- "type": "Direct",
144- "requested": "[12.*, )",
145- "resolved": "12.0.3",
146- "contentHash": "6mgjfnRB4jKMlzHSl+VD+oUc1IebOZabkbyWj2RiTgWwYPPuaK1H97G1sHqGwPlS5npiF5Q0OrxN1wni2n5QWg=="
147- }
148- },
149- "net7.0/linux-x64": {},
150- "net7.0/win-x64": {}
151- }
152- }
153- ` ,
154- } ,
155- ] ;
156- projectDirs [ 'publishWithLockfile' ] = codeGenerator . generate (
157- 'fixtures' ,
158- fixtures ,
159- ) ;
160-
161- const publishDir = await dotnet . publish ( projectDirs [ 'publishWithLockfile' ] ) ;
162-
163- const contents = fs . readdirSync ( publishDir ) ;
164- expect ( contents ) . toContain ( 'testproject.deps.json' ) ;
165- } ) ;
166-
167101 it . each ( [
168102 {
169103 shortName : 'net6.0' ,
0 commit comments