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

TeamCity Build Failing #207

Closed
kevingy opened this issue Jul 10, 2018 · 11 comments
Closed

TeamCity Build Failing #207

kevingy opened this issue Jul 10, 2018 · 11 comments
Assignees

Comments

@kevingy
Copy link
Contributor

kevingy commented Jul 10, 2018

I need some help from someone with more TeamCity experience than I have. The TeamCity build has been failing for about 8 months. There hasn't been a lot of changes since then, but I see the potential for more coming soon. I was having a problem where the build wasn't downloading Nuget packages. I may or may not have fixed that. I can't tell because the build is just hanging.

@jbuedel Are you available to assist? I recall that you did a lot (all?) of the TeamCity setup initially.

@jbuedel
Copy link
Contributor

jbuedel commented Jul 11, 2018

Can do. I’ll look into it soon

@kevingy
Copy link
Contributor Author

kevingy commented Jul 12, 2018

I wonder if the issue is that the build is configured to TargetFramework=net40. The unit test project doesn't have a net40 target. It has a net45 target. It doesn't make sense that this would cause the project to not be able to find dependencies. I don't have anything else.

We have a task to upgrade all of the projects to net45. Maybe leave this until the 45 update is complete. The build has been broken for 8 months. Being broken a bit longer won't hurt.

@ProgMusc13
Copy link

I was having an issue (#198) with TLS 1.2 support and since it wasn't completed I downloaded the source, made the changes to net472 (skipping net45) and it seems to be working well. (Thank you kevingy for stating the necessary change to the Browser constructor.) Before I made the changes I noticed the test project version was net45 already and it did NOT seem to be working, although it did not complain when compiling. I suspicion the cause to be in the dependency load for RazorLight. Also, the targetFramework selector in the project files was NOT working, necessitating changes to be made to the .csprog files directly. I bet I still have some of that set incorrectly.

@kevingy kevingy self-assigned this Sep 13, 2018
@Teun
Copy link
Contributor

Teun commented Sep 28, 2018

I can have a look at it. It is still failing. The error message is rather mysterious.

I also expect that the key for publishing to nuget.org is expired. I had to create a new one for the WebDriver project. But that will only become an issue once the build stops failing.

@Teun
Copy link
Contributor

Teun commented Sep 28, 2018

Not quite working, but made some prgress:

Maybe @Styxxy could have a look into this. He set up the dual targeting and may know of a way to get nuget pack working for this setup. Maybe switch back to packing based on the nuspec instead of the csproj?

@Teun
Copy link
Contributor

Teun commented Oct 1, 2018

I got myself a Windows dev machine and have it partially working. There were quite some little things wrong in the code base. On my machine (culture: nl-NL) the unit tests for NumberInput were broken. In a large number of places the code for that element does string<->decimal conversions without worrying about cultures at all. That can't be right. I fixed all of those places, but the code can now use some refactoring and cleaning up.
The solution itself is building both net45 and netstandard2.0 when running in VS2017, but from MSBuild, I can get only net45 working. The nuget pack command also fails (known Nuget bug). I resorted to packaging only the net45 version for now. The package is now published as a prerelease version to nuget. It works fine when running Update-Package for an existing project and to my surprise, it even works from .NET Core 2.1 with a warning (NU1701 Package 'SimpleBrowser 0.5.154-pre' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project).

  1. Can some more people try to use this prerelease version please? Just run Update-Package SimpleBrowser -IncludePrerelease
  2. I think that when after 2.5 year we publish a new package with so many changes in it, we should probably reflect this in the version number? 0.6.x?
  • the fixed version is in a branch. I have configured TeamCity to be able to build feature branches. We should probably use this for building pull requests too.
  • then maybe we are prepared to automatically create packages for any master commit, because we can already do a full build with tests AND publishing the package as a prerelease before touching master?

@Styxxy
Copy link
Contributor

Styxxy commented Oct 3, 2018

@Teun Which errors do you get? On command line, when I did the conversion it worked. But maybe something changed in the meantime :-).

@Teun
Copy link
Contributor

Teun commented Oct 4, 2018

If you run nuget pack on the csproj file (the modern approach), it logs:

Unable to find 'bin\Release\SimpleBrowser\bin\Release\'. Make sure the project has been built.

Link to build log, log in as guest. This is the NuGet issue with an error message that looks suspiciously similar: NuGet/Home#4054.

The workaround I tried was to use the nuspec file, but then you have to make sure that the build step has built both target platforms. I think this would be possible, but for some reason I couldn't get it to work. Check on a log of this approach here.

@kevingy
Copy link
Contributor Author

kevingy commented May 21, 2019

The TeamCity build is no longer failing. That would be good news, except that TeamCity isn't building at all. Our project now requires MSBuildTools16.0_x86_Path, but there are no TeamCity build agents that support that requirement.

@kevingy
Copy link
Contributor Author

kevingy commented May 28, 2019

Since TeamCity no longer works, what about moving over to Azure DevOps Pipelines? I've used it for a few other projects. It seems fairly simple.

@kevingy
Copy link
Contributor Author

kevingy commented Sep 3, 2019

Cured the disease by killing the patient. CI/CD is now on Azure DevOps Pipelines.

@kevingy kevingy closed this as completed Sep 3, 2019
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

No branches or pull requests

5 participants