Skip to content
petroslikidis edited this page May 25, 2021 · 1 revision
  1. Create a new repository if needed. Initiate it with a .gitignore file for VisualStudio and a License file for Apache version 2.0. If not goto step 7
  2. Manage access rights to the new respository (Settings).
  3. Update conversion status: https://github.com/statisticssweden/PxWeb/wiki/Conversion-status
  4. Clone the repository to your local machine git the command git clone <url-to-repository>
  5. Create a new .NET Standard Class Library project in the right programming language and place it the folder of your cloned repository.
  6. Make sure that there is no extra folders for the project files and the solution files.
  7. Under properties for the project set the target frame work to .NET Standard 2.0 or lower if possible.
  8. If it is a Visual Basic project make sure to blank out the Root namespace under the project properties.
  9. Copy the files from the PxWeb repository into your new project. Except bin, obj, My Project (VB)/Properties (C#) or project-file.
  10. Get references to the new nugets, Log4Net (latest version) and Microsoft.SourceLink.Github.
  11. Make an initial commit with all the added files.
  12. Correct any errors without breaking the comparability and document this changes in the wiki page Conversion to netstandard fixes and commit your fixes one at a time.
  13. To be able to debug the the netstandard added as nugets to the project, do the following setup i Visual Studio: Tools -> Options -> Debugging: Uncheck "Enable just my code" Check "Enable Source Link Support". See https://github.com/statisticssweden/PxWeb/wiki/Conversion-use-of-Source-Link
  14. In the netstandard branch of PxWeb replace the references to the old assemblies with the reference to your newly created and try to run it and see if it works. (Not mandatory)
  15. In properties for the project under "Package":
  1. Add the following row to the PropertyGroup section of the project-file. <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
  2. Create a nuget package and deploy it. Build in release and the .nupkg-file is created in the bin catalogue for release.
  3. Go to nuget.org, login and upload the .nupkg-file, set PC-Axis as the owner. Also include the .pdb file.
  4. In the netstandard branch of PxWeb replace the references to the assembly so that it refrence the newly created nuget package.
  5. Add a MSTest Test Project (.NET Core) to the solution. Give the project the same name as the repository project followed by .UnitTest (For example PCAxis.Core.UnitTest). Select the same programming language as the project it shall test.
  6. Add a simple unit test