New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some building problems #2067
Conversation
- build.ps1: problem with build in international system environment - Microsoft.Test.E2E.AspNetCore3x.OData.csproj - missing PackageReference added (see build errors below) 4>C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\QueryComposition\ServerTypeTests.cs(89,25): error CS1069: The type name 'EventLog' could not be found in the namespace 'System.Diagnostics'. This type has been forwarded to assembly 'System.Diagnostics.EventLog, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. [C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\Build.AspNetCore3x\Microsoft.Test.E2E.AspNetCore3x.OData.csproj] 4>C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\QueryComposition\ServerTypeTests.cs(89,47): error CS1069: The type name 'EventLog' could not be found in the namespace 'System.Diagnostics'. This type has been forwarded to assembly 'System.Diagnostics.EventLog, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. [C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\Build.AspNetCore3x\Microsoft.Test.E2E.AspNetCore3x.OData.csproj] 4>C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\QueryComposition\ServerTypeTests.cs(93,29): error CS0103: The name 'EventLogEntryType' does not exist in the current context [C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\Build.AspNetCore3x\Microsoft.Test.E2E.AspNetCore3x.OData.csproj] 4>C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\QueryComposition\ServerTypeTests.cs(115,61): error CS0103: The name 'EventLogEntryType' does not exist in the current context [C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\Build.AspNetCore3x\Microsoft.Test.E2E.AspNetCore3x.OData.csproj] 4>Done Building Project "C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\Build.AspNetCore3x\Microsoft.Test.E2E.AspNetCore3x.OData.csproj" (default targets) -- FAILED.
@@ -31,6 +31,7 @@ | |||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.2.0" /> | |||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.0" /> | |||
<PackageReference Include="Microsoft.OData.Client" Version="7.6.1" /> | |||
<PackageReference Include="System.Diagnostics.EventLog" Version="4.7.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this package dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've actually hasn't changed anything in code (.cs files), but existing
'.\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\QueryComposition\ServerTypeTests.cs'
is using System.Diagnostics, specifically EventLog and EventLogEntryType and I could not build the project (dotnet 3.1.2) freshly downloaded/checked out into a new empty folder (see build errors in my pull request and/or commit descriptions).
---> Note that
TargetFrameworkVersion=v4.6.1 for Microsoft.Test.E2E.AspNetCore.OData.csproj but
TargetFrameworkVersion=netcoreapp3.1 for Microsoft.Test.E2E.AspNetCore3x.OData.csproj.
The whole class Microsoft.Test.E2E.AspNet.OData.QueryComposition.ServerTypeTests
seems to be unused, test code compiles without it and test results with or without it are the same on my computer.
If ServerTypeTests.cs was removed, the PackageReference could be removed as well.
Still I am not confident/familiar enough with the project to propose the removal.
P.S.
The ServerTypeTests.cs was added here
Commit 20d0ab5
Fan Ouyang t-oufan@microsoft.com
28.04.2015 8:06:44
Committed by:
Fan Ouyang t-oufan@microsoft.com
29.04.2015 8:51:34
Parent: 4bc0800
Issues
Minor build process fixes
Description
4>C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\QueryComposition\ServerTypeTests.cs(89,25): error CS1069: The type name 'EventLog' could not be found in the namespace 'System.Diagnostics'. This type has been forwarded to assembly 'System.Diagnostics.EventLog, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. [C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\Build.AspNetCore3x\Microsoft.Test.E2E.AspNetCore3x.OData.csproj]
4>C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\QueryComposition\ServerTypeTests.cs(89,47): error CS1069: The type name 'EventLog' could not be found in the namespace 'System.Diagnostics'. This type has been forwarded to assembly 'System.Diagnostics.EventLog, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. [C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\Build.AspNetCore3x\Microsoft.Test.E2E.AspNetCore3x.OData.csproj]
4>C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\QueryComposition\ServerTypeTests.cs(93,29): error CS0103: The name 'EventLogEntryType' does not exist in the current context [C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\Build.AspNetCore3x\Microsoft.Test.E2E.AspNetCore3x.OData.csproj]
4>C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\QueryComposition\ServerTypeTests.cs(115,61): error CS0103: The name 'EventLogEntryType' does not exist in the current context [C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\Build.AspNetCore3x\Microsoft.Test.E2E.AspNetCore3x.OData.csproj]
4>Done Building Project "C:\ProjectsG\Attis\Labs\OData\Github\WebApi\test\E2ETest\Microsoft.Test.E2E.AspNet.OData\Build.AspNetCore3x\Microsoft.Test.E2E.AspNetCore3x.OData.csproj" (default targets) -- FAILED.
Checklist (Uncheck if it is not completed)
Additional work necessary
NONE