DanWahlin / AspNetCorePostgreSQLDockerApp

ASP.NET Core with PostgreSQL Docker App Demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't run local, and docker compose doesn't work?

FvdG opened this issue · comments

Hi,

I've got two (probably newbie) issues :

I cant seem to build the project and run it locally? I'm using..
.NET Command Line Tools (1.0.0-preview3-004056)
Product Information:
Version: 1.0.0-preview3-004056
Commit SHA-1 hash: ccc4968bc3

Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64

I've tried dotnet run , but it keeps telling me :

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

And the second thing, when I try docker-compose build i get the following:

IOError: [Errno 13] Permission denied: 'C:\source\AspNetCorePostgreSQLDockerApp.vs\AspNetCorePostgreSQLDockerApp\v15\Browse.VC.opendb'
docker-compose returned -1

If it's a totally dumb question, i'm sorry.

With kind regards,

Frank

This particular project is designed to be run with Docker so on the first error I can only recommend that you make sure you're running commands in the same folder where the project.json file is located. There's no reason the project shouldn't be able to run locally, but it's just not something I test for with this particular project.

As far as the second, it may be due to the location where you're running it. Try running the code from somewhere within your user's folder (from your Desktop for example). If you still get problems make sure sharing is enabled in the Docker for Windows preferences (located in the Windows tray area).

Hi Dan,

I figured it out. I had to do a dotnet migrate on the project.json file to create a . xproj file.

Else it keeps telling me:

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

Because of .NET Core Tools MSBuild “alpha” which got installed with the new vs2017 rc.
The new Tools release can be used with both the .NET Core 1.0 and .NET Core 1.1 runtimes.

https://blogs.msdn.microsoft.com/dotnet/2016/11/16/announcing-net-core-tools-msbuild-alpha/ explains why and how to do this.

After this migrate i've got your great reference project up-and-running. Many thanx!

Frank