Category: .NET Core

  • Making visible the application -part 21

    Trying to make visible the docker with https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/ignatandrei/InfoValutar/master/PlayWithDocker/WebAPI.yml leaving an issue: https://github.com/play-with-docker/play-with-docker/issues/370   Decided  to add to the readme the docker . Going to Shields.io . Putting some lines for beginners with docker. Reading more about port –binding . Figuring this is is: ENV ASPNETCORE_URLS=http://*:8080 #ENV ASPNETCORE_URLS=http://0.0.0.0:8080 And that was all !

  • Docker–fourth part–part 20

    Time to push to docker 1. putting the docker password into the pipeline variables 2. Modifying the yaml 3. Waiting for build Error in Docker:  Incorrect name or password Now,I want to create 2 jobs to isolate Docker from the main build. I encounter some errors in the yaml file . That shows fast in…

  • Docker–third part–part 19

    Trying different  codes in the csproj to add dynamically content from a folder ( including the dll’s copied there ) and to retrieve in the output directory: ( reading from internet of all those stuff) Version 1: <!–<Target Name=”ContentsBeforeBuild” AfterTargets=”BeforeBuild”> <ItemGroup> <Content Include=”plugins\**” /> </ItemGroup> </Target>—> Version 2: <!–<Content Update=”plugins\**\*.dll” CopyToOutputDirectory=”Always” LinkBase=”plugins”> </Content>—> Version 3:…

  • Docker–second part–part 18

    Now,I must replace all with powershell files. Some problem  – if I build twice,it says : resource already exists. So I need to add –Force parameter. Now pushing to GitHub https://github.com/ignatandrei/InfoValutar/commit/2c487963da53f04f94a0a7b060999f8e27635179 and see if it works. No,error on .sln build. ObjectNotFound: (/home/runner/work/I\u2026nfoValutar/plugins” Apparently,it is a Unicode character ? Try to save as ASCII file. Waiting…

  • Docker–first part–part 17

    Trying to put the web into docker. In order to have easy builds for the developer,we copy the sln,then the csproj,then dotnet restore,then copy files. This way we get advantage of Docker caching. Created dockerForWebAPI.txt and run docker build -f dockerForWebAPI.txt  -t infovalutar .. Docker has not recursive copy – https://github.com/moby/moby/issues/15858 Solution: copy the .csproj…

  • Swagger/OpenAPI –part 16

    In order to see the WebAPI,Swagger is a default technology. Reading https://docs.microsoft.com/en-us/aspnet/core/tutorials/web-api-help-pages-using-swagger?view=aspnetcore-3.0,seems to have 2 options: Swashbuckle and NSwag. Looking at github repositories,both have > 2k stars,active development,tutorials. The only thing that I see more at NSwag are generators for Angular. Integrated NSwag as for the tutorial from https://docs.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-nswag?view=aspnetcore-3.0&tabs=visual-studio . There is a small problem…

  • Repairing the build and versioning–part 15

    Now,after copy the plugins,the build is not working. Thnking about the build events,I realize that to find same copy command on Linux and Windows is difficult – so Windows it is. ( and,BTW,In LInux the macro $(SolutionDir ) does not work use  repoRoot https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2019 https://github.com/Microsoft/msbuild/issues/2397 ) Switch windows-latest on https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idruns-on  Now tests are failing –…

  • Plugin copy and caching- part 14

    I have had 2 problems to solve How to put the plugins for the console and web api ? How to cache the data  ? ( plugins / exchange rates)   The solution for the first problem should be easy for the programmer PC,and for the deploying the application ( console/ web api/ etc )There…

  • Creating the WebAPI–part 13

    I am now tired of continuously improving the console application – so now some work that others can see really.  Creating the WebAPI is simple as a project  – and I was amazed to see a WeatherForecast controller. I need just to be able to see the today exchange rates via API . So created…

  • Documentation and refactoring for plugins and wrong code coverage – part 12

    I realized that will be no documentation for plugins – until I create one . Figured also that each plugin should have a name  -to understand from where he grabs data – so some code involved code.   Asking when and if the plugins are copied to the application  – not found yet an answer……