This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Can't read project.json with generator-aspnet and generator-docker #134
Comments
Check out #130. The generator doesn't support dotnet core 1.1 (yet). I'm in the process of updating it. |
Having this same issue with dotnetcore 1.0.1 |
I look forward to the update. |
any updates yet? |
Just following the official documentation at https://docs.microsoft.com/en-us/dotnet/articles/core/docker/building-net-docker-images and hit this error. |
same here |
Dropped h2romero's comment from #136 in a project.json file to build the dockerTask.sh. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When I try to create a default asp.net web application with docker I use generator-aspnet and generator-docker and the generation fails because generator-docker expects a project.json file.
These are the versions of my software.
node v6.10.0
npm 4.3.0
[email protected]
[email protected]
windows 10
C:\projects\Reference Applications\asp_net_docker> yo aspnet
---------´ │ generator! │ ( _´U
_ ) ╰──────────────────────────╯/A\ /
| ~ |
'..'_
´
|° ´ Y
? What type of application do you want to create? Web Application Basic [without Membership and Authorization]
? Which UI framework would you like to use? Bootstrap (3.3.7)
? What's the name of your ASP.NET application? WebApplicationBasic
create WebApplicationBasic.bowerrc
create WebApplicationBasic\bundleconfig.json
create WebApplicationBasic.gitignore
create WebApplicationBasic\bower.json
create WebApplicationBasic\appsettings.json
create WebApplicationBasic\appsettings.Development.json
create WebApplicationBasic\WebApplicationBasic.csproj
create WebApplicationBasic\Program.cs
create WebApplicationBasic\Properties\launchSettings.json
create WebApplicationBasic\README.md
create WebApplicationBasic\Startup.cs
create WebApplicationBasic\web.config
create WebApplicationBasic\Controllers\HomeController.cs
create WebApplicationBasic\Views_ViewImports.cshtml
create WebApplicationBasic\Views_ViewStart.cshtml
create WebApplicationBasic\Views\Home\About.cshtml
create WebApplicationBasic\Views\Home\Contact.cshtml
create WebApplicationBasic\Views\Home\Index.cshtml
create WebApplicationBasic\Views\Shared_Layout.cshtml
create WebApplicationBasic\Views\Shared\Error.cshtml
create WebApplicationBasic\wwwroot\css\site.css
create WebApplicationBasic\wwwroot\css\site.min.css
create WebApplicationBasic\wwwroot\favicon.ico
create WebApplicationBasic\wwwroot\images\banner1.svg
create WebApplicationBasic\wwwroot\images\banner2.svg
create WebApplicationBasic\wwwroot\images\banner3.svg
create WebApplicationBasic\wwwroot\images\banner4.svg
create WebApplicationBasic\wwwroot\js\site.js
create WebApplicationBasic\wwwroot\js\site.min.js
create WebApplicationBasic\global.json
I'm all done. Running bower install for you to install the required dependencies. If this fails, try running the command yourself.
bower jquery#2.2.4 cached https://github.com/jquery/jquery-dist.git#2.2.4
bower jquery#2.2.4 validate 2.2.4 against https://github.com/jquery/jquery-dist.git#2.2.4
bower jquery-validation#1.15.0 cached https://github.com/jzaefferer/jquery-validation.git#1.15.0
bower jquery-validation#1.15.0 validate 1.15.0 against https://github.com/jzaefferer/jquery-validation.git#1.15.0
bower jquery-validation-unobtrusive#3.2.6 cached https://github.com/aspnet/jquery-validation-unobtrusive.git#3.2
.6
bower jquery-validation-unobtrusive#3.2.6 validate 3.2.6 against https://github.com/aspnet/jquery-validation-unobt
rusive.git#3.2.6
bower bootstrap#3.3.7 cached https://github.com/twbs/bootstrap.git#3.3.7
bower bootstrap#3.3.7 validate 3.3.7 against https://github.com/twbs/bootstrap.git#3.3.7
bower jquery#2.2.4 install jquery#2.2.4
bower jquery-validation-unobtrusive#3.2.6 install jquery-validation-unobtrusive#3.2.6
bower jquery-validation#1.15.0 install jquery-validation#1.15.0
bower bootstrap#3.3.7 install bootstrap#3.3.7
jquery#2.2.4 wwwroot\lib\jquery
jquery-validation-unobtrusive#3.2.6 wwwroot\lib\jquery-validation-unobtrusive
├── jquery#2.2.4
└── jquery-validation#1.15.0
jquery-validation#1.15.0 wwwroot\lib\jquery-validation
└── jquery#2.2.4
bootstrap#3.3.7 wwwroot\lib\bootstrap
└── jquery#2.2.4
Your project is now created, you can use the following commands to get going
cd "WebApplicationBasic"
dotnet restore
dotnet build (optional, build will also happen when it's run)
dotnet run
C:\projects\Reference Applications\asp_net_docker\WebApplicationBasic> ls
Mode LastWriteTime Length Name
d----- 3/16/2017 2:23 PM Controllers
d----- 3/16/2017 2:23 PM Properties
d----- 3/16/2017 2:23 PM Views
d----- 3/16/2017 2:23 PM wwwroot
-a---- 3/16/2017 2:23 PM 36 .bowerrc
-a---- 3/16/2017 2:23 PM 4418 .gitignore
-a---- 3/16/2017 2:23 PM 165 appsettings.Development.json
-a---- 3/16/2017 2:23 PM 102 appsettings.json
-a---- 3/16/2017 2:23 PM 219 bower.json
-a---- 3/16/2017 2:23 PM 601 bundleconfig.json
-a---- 3/16/2017 2:23 PM 53 global.json
-a---- 3/16/2017 2:23 PM 555 Program.cs
-a---- 3/16/2017 2:23 PM 2131 README.md
-a---- 3/16/2017 2:23 PM 1967 Startup.cs
-a---- 3/16/2017 2:23 PM 677 web.config
-a---- 3/16/2017 2:23 PM 611 WebApplicationBasic.csproj
C:\projects\Reference Applications\asp_net_docker\WebApplicationBasic> dotnet restore
Restoring packages for C:\projects\Reference Applications\asp_net_docker\WebApplicationBasic\WebApplicationBasic.csproj...
Generating MSBuild file C:\projects\Reference Applications\asp_net_docker\WebApplicationBasic\obj\WebApplicationBasic.csproj.nuget.g.props.
Generating MSBuild file C:\projects\Reference Applications\asp_net_docker\WebApplicationBasic\obj\WebApplicationBasic.csproj.nuget.g.targets.
Writing lock file to disk. Path: C:\projects\Reference Applications\asp_net_docker\WebApplicationBasic\obj\project.assets.json
Restore completed in 1.27 sec for C:\projects\Reference Applications\asp_net_docker\WebApplicationBasic\WebApplicationBasic.csproj.
NuGet Config files used:
C:\Users\me\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages
C:\projects\Reference Applications\asp_net_docker\WebApplicationBasic> ls
Mode LastWriteTime Length Name
d----- 3/16/2017 2:23 PM Controllers
d----- 3/16/2017 2:24 PM obj
d----- 3/16/2017 2:23 PM Properties
d----- 3/16/2017 2:23 PM Views
d----- 3/16/2017 2:23 PM wwwroot
-a---- 3/16/2017 2:23 PM 36 .bowerrc
-a---- 3/16/2017 2:23 PM 4418 .gitignore
-a---- 3/16/2017 2:23 PM 165 appsettings.Development.json
-a---- 3/16/2017 2:23 PM 102 appsettings.json
-a---- 3/16/2017 2:23 PM 219 bower.json
-a---- 3/16/2017 2:23 PM 601 bundleconfig.json
-a---- 3/16/2017 2:23 PM 53 global.json
-a---- 3/16/2017 2:23 PM 555 Program.cs
-a---- 3/16/2017 2:23 PM 2131 README.md
-a---- 3/16/2017 2:23 PM 1967 Startup.cs
-a---- 3/16/2017 2:23 PM 677 web.config
-a---- 3/16/2017 2:23 PM 611 WebApplicationBasic.csproj
C:\projects\Reference Applications\asp_net_docker\WebApplicationBasic> yo docker
---------´ │ Let's add Docker │ ( _´U
_ ) │ container magic to your │/A\ /│ app! │
| ~ | ╰──────────────────────────╯
'..'_
´
|° ´ Y
? What language is your project using? .NET Core
? Which version of .NET Core is your project using? rtm
? Does your project use a web server? Yes
? Which port is your app listening to? 5000
? What do you want to name your image? webapplicationbasic
? What do you want to name your service? webapplicationbasic
? What do you want to name your compose project? webapplicationbasic
× Error: Can't read project.json file. Make sure project.json file exists.
at ReadFileContext.callback (C:\ProgramData\nvm\v6.10.0\node_modules\generator-docker\generators\app\dotnetHelper.js:134:16)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:365:13)
create .vscode\launch.json
create Dockerfile.debug
create Dockerfile
create docker-compose.debug.yml
create docker-compose.yml
create dockerTask.ps1
create dockerTask.sh
create .vscode\tasks.json
Errors occured. Please fix them and re-run the generator.
C:\projects\Reference Applications\asp_net_docker\WebApplicationBasic>
The text was updated successfully, but these errors were encountered: