Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Fix some building problems #2067

wants to merge 1 commit into from

Conversation

tomimon
Copy link
Contributor

@tomimon tomimon commented Feb 26, 2020

Issues

Minor build process fixes

Description

  • 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.

Checklist (Uncheck if it is not completed)

  • NOT applicable: [ ] Test cases added
  • NOT applicable: [ ] Build and test with one-click build and test script passed

Additional work necessary

NONE

- 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.
@msftclas
Copy link

msftclas commented Feb 26, 2020

CLA assistant check
All CLA requirements met.

@@ -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" />
Copy link
Member

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?

Copy link
Contributor Author

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

@xuzhg
Copy link
Member

xuzhg commented Apr 10, 2020

@tomimon Thanks for your contribution. I merged part of your commit and scoped the dependency changes out here. If you still face the dependency problem (so far, we don't have such dependency problem), welcome file a new PR for us review. Thanks.

@xuzhg xuzhg closed this Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants