Core: .NET Core 3.0.0 Preview 8

Created on 13 Aug 2019  路  42Comments  路  Source: dotnet/core

Release Notes
Download

Blog posts

.NET Core
ASP.NET Core
EF Core

Please report any issues you find with 3.0.0 Preview 8, either responding to this issue, creating a new issue or creating a new issue in one of the following repos:

announcement

Most helpful comment

I believe the issue here is that however produces that package, didn't include the new templates folder in it. They ship as part of the SDK in 3.0. @vitek-karas do you know how this package is produced? Or by who? They need to fix the package.

All 42 comments

After upgrade to 3.0.0. Preview 8 i got

TypeLoadException: Could not load type 'Microsoft.AspNetCore.Components.ElementRef' from assembly 'Microsoft.AspNetCore.Components, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

Don't know where to start debug. I'm using MatBlazor, som maybe there is something there.

An update: Have now find that this error occurred when using MatBlazore component, so the bugs seams to be in that library.

@danroth27 @shirhatti @anurse

@snerting per the edit you made below, it sounds like the MatBlazor library just hasn't updated for preview 8. There are definitely breaking changes between previews so it's likely that's the source of the issue.

If you do encounter an issue in ASP.NET Core, I'd suggest filing a bug at http://github.com/aspnet/AspNetCore so that it shows up in our triage process.

Thanks for trying the latest preview so quickly!

(Arch linux) After upgrading to 3.0 preview 8, all the regular templates from the dotnet new command are gone.

@livarcocc

@jchand99 how are you seeing that the templates are gone? They don't show up when you run dotnet new?

cc @vijayrkn

Yes, running dotnet new gives me this output:

Usage: new [options]

Options:
-h, --help Displays help for this command.
-l, --list Lists templates containing the specified name. If no name is specified, lists all templates.
-n, --name The name for the output being created. If no name is specified, the name of the current directory is used.
-o, --output Location to place the generated output.
-i, --install Installs a source or a template pack.
-u, --uninstall Uninstalls a source or a template pack.
--nuget-source Specifies a NuGet source to use during install.
--type Filters templates based on available types. Predefined values are "project", "item" or "other".
--dry-run Displays a summary of what would happen if the given command line were run if it would result in a template creation.
--force Forces content to be generated even if it would change existing files.
-lang, --language Filters templates based on language and specifies the language of the template to create.
--update-check Check the currently installed template packs for updates.
--update-apply Check the currently installed template packs for update, and install the updates.

Templates Short Name Language Tags

no templates where templates list usually is

Ok. Thanks for the quick response.

@vijayrkn can your team take a look?

Can you check if you have templates available in the following location ?

<dotnet install path>/templates/3.0.0-preview8-<build number>

Adding @phenning

/opt/dotnet/ contains the following directories:

  • /host
  • /sdk
  • /shared

but no /templates

how did you install the SDK? What is the result of running dotnet --info in the machine?

dotnet --info gives me:

.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview8-013656
Commit: 8bf06ffc8d

Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: linux-x64
Base Path: /opt/dotnet/sdk/3.0.100-preview8-013656/

Host (useful for support):
Version: 3.0.0-preview8-28405-07
Commit: d01b2fb7bc

.NET Core SDKs installed:
2.2.108 [/opt/dotnet/sdk]
3.0.100-preview8-013656 [/opt/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.6 [/opt/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.6 [/opt/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview8.19405.7 [/opt/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.6 [/opt/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview8-28405-07 [/opt/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

and I have the aur package dotnet-sdk-preview installed

I believe the issue here is that however produces that package, didn't include the new templates folder in it. They ship as part of the SDK in 3.0. @vitek-karas do you know how this package is produced? Or by who? They need to fix the package.

Seems the maintainer is a user by the name of fmauNeko. Should I comment on the package listing on the AUR specifying that the templates folder is missing from the package?

Yes. That the real issue here.

In the meantime you can install the templates from NuGet.org if those templates are available in NuGet.

example: dotnet new -i Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0

we updated from Preview 6 to Preview 8 and I cannot reference Microsoft.AspNetCore.Http.Internal. Is this by chance removed?

@anurse I got the TypeLoadException myself as well. It's causing some tests to fail in my project. And sometimes there's even more weird stuff when just rerunning the same tests for the same commit.

At this point, I've wasted too many hours already trying to figure out the root cause of this issue. Every time when I try to rule out some files by removing them, it's inconsistently working or not working by just cleaning, removing bin/obj folders, rebuilding in VS and/or CLI without changing additional code. I can't pinpoint the source this way.

However, there's one thing I can say for certain, moving all the files into 1 console project, and trying to call the same function as in those tests, will fail with the same TypeLoadException (with reference to its own assembly...).

As you're saying that there's breaking changes between previews, do you know what has been changed between P7 and P8 that might cause this behavior? P7 worked just fine.

we updated from Preview 6 to Preview 8 and I cannot reference Microsoft.AspNetCore.Http.Internal. Is this by chance removed?

Yes. Have a look at https://github.com/aspnet/Announcements/issues/377

As you're saying that there's breaking changes between previews, do you know what has been changed between P7 and P8 that might cause this behavior? P7 worked just fine.

I don't have that information handy. In general, if you have a question about ASP.NET Core specifically, it's probably best to file the issue on the ASP.NET Core repo itself: https://github.com/aspnet/AspNetCore

@anurse I forgot to mention that this issue has nothing to do with ASP.NET Core for me, even though the exception type itself is the same as the other person's issue. It's just .NET Core that's causing it. You can see that in the CI logs I linked.

Can we expect FSharp.Core 4.7 to be included in the next preview, since it has been left out of this one?

cc @cartermp

F# 4.7 is in this preview.

@Archomeda Ok, then it's not directly related to the above issue.

Problem:
If i generate a new console project with the preview 8 sdk, it doesn't print hello world, just exits as if the program is completed.

Info:
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview8-013656
Commit: 8bf06ffc8d

Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /snap/dotnet-sdk/45/sdk/3.0.100-preview8-013656/

Host (useful for support):
Version: 3.0.0-preview8-28405-07
Commit: d01b2fb7bc

.NET Core SDKs installed:
3.0.100-preview8-013656 [/snap/dotnet-sdk/45/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0-preview8.19405.7 [/snap/dotnet-sdk/45/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0-preview8-28405-07 [/snap/dotnet-sdk/45/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Steps:
1) Remove all previous installations of dotnet core via script from here
2) Use snap command from here to download the latest sdk preview
3) Create a new folder "test"
4) Navigate into test and run command
dotnet-sdk.dotnet new console
A new console project will be generated.
5) Type dotnet-sdk.dotnet run

Observation: For a second or 2 it seems like the console is about to start up but it exits returning control back to the user (usually that happens after we hit enter in the hello world app).

@vijayrkn I noticed that it appears that no-one has seen the bug I reported Core 3.0.100-preview8-013656 building netstandard2.0 project with CLI fails #3205. I attached a sample project that can be used to reproduce the error. Just want to make sure your team knows about it.

@codeinstinct - can you please file a separate issue for this in dotnet/core-setup (let's start there).

I tried your repro steps (without uninstalling everything as I don't want to ruin my test machine completely) and it works OK for me.

You can try to run dotnet-sdk.dotnet build and then go to bin/Debug/netcoreapp3.0 and run dotnet-sdk.dotnet test.dll. Does that work?

If it doesn't please try export COREHOST_TRACE=1 and export COREHOST_TRACEFILE=t.log. Then run it again. This will produce a rather lengthy t.log. Take a look through it (probably near the end) to see if there's anything obvious. It may contain information about your machine (full paths, user name, OS type and so on), but if you're OK sharing it, we can also take a look at that file and try to figure out what's wrong.

Thanks for the quick response.

You can try to run dotnet-sdk.dotnet build and then go to bin/Debug/netcoreapp3.0 and run dotnet-sdk.dotnet test.dll. Does that work?

Yes, this works as expected.

Also, fyi, dotnet-sdk.dotnet new blazorwasm too works as expected.

In that case - please try to setup the tracing exports as mentioned above and run the dotnet run command which doesn't work - that should tell us where it fails.

In that case - please try to setup the tracing exports as mentioned above and run the dotnet run command which doesn't work - that should tell us where it fails.

Please see the t.log contents here.
If you need this data to be available for more than 7 days, please make a copy at your side.

/cc @nguerrera @peterhuene - as far as I can tell the host correctly runs the msbuild, but then the app is never started - there's no command in the log to run the dotnet app.dll or to run the apphost directly.

I don't know if there's any way to turn on additional logging in the CLI to show whether it tried to actually launch the app and if so, what command it tried to run to do so.

There is a -d or --diagnostics option:

C:\Users\nicholg\abc>dotnet --diagnostics run
Telemetry is: Enabled
Running C:\Users\nicholg\abc\bin\Debug\netcoreapp3.0\abc.exe
Process ID: 5512
Hello World!

@vitek-karas this looks like https://github.com/dotnet/core-setup/issues/5186. Snap breaks the use of the framework-dependent apphost because it can't locate any of its dependencies it expects (including libc). I would do a dotnet run and then echo $?. It is likely a SIGSEGV.

I commented with a potential workaround here: https://github.com/dotnet/cli/issues/12269#issuecomment-521835506.

I would do a dotnet run and then echo $?

FYI, following these steps, I get 139.

Problem: Bootstrap css 404 error in newly generated blazorserver template.

Info:
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview8-013656
Commit: 8bf06ffc8d

Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /snap/dotnet-sdk/45/sdk/3.0.100-preview8-013656/

Host (useful for support):
Version: 3.0.0-preview8-28405-07
Commit: d01b2fb7bc

.NET Core SDKs installed:
3.0.100-preview8-013656 [/snap/dotnet-sdk/45/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0-preview8.19405.7 [/snap/dotnet-sdk/45/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0-preview8-28405-07 [/snap/dotnet-sdk/45/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Steps:

  • Remove all previous installations of dotnet core via script from here
  • Use snap command from here to download the latest sdk preview
  • Create a new folder "web" and navigate into it.
  • Execute dotnet-sdk.dotnet new blazorserver. A new blazor server side project is generated successfully.
  • Execute dotnet-sdk.dotnet build. Build completes successfully.
  • Navigate to /bin/Debug/netcoreapp3.0/
  • Execute dotnet-sdk.dotnet run Project launches successfully in browser

Observations:

  • Bootstrap.min.css has clearly not loaded. 404 Error in chrome console.
  • Bootstrap.min.css is present where it's expected to be in wwwroot/css/bootstrap.

Contents of web.csproj
```


netcoreapp3.0
7.3


````

Problem: Bootstrap css 404 error in newly generated blazorserver template.

@codeinstinct This is expected, because the content root of ASP.NET Core based apps is the current directory and the webroot (wwwroot) is relative to the content root. You need to run the app from the root of the project during development. An easy way to do this is to use dotnet run from the project root.

@codeinstinct Sorry for the late reply but I was on vacation. Exit code 139 is SIGSEGV, so I believe this to be the same problem as https://github.com/dotnet/core-setup/issues/5186; that being snap installs are broken with respect to the .NET Core apphost. Thus global tools and framework-dependent building and publishing of a .NET Core application won't work when run through the apphost (the executable in the output directory).

Problem:
I created a new Angular project using dotnet new, but whenever I try to run it I get the following error:
The specified framework 'Microsoft.AspNetCore.App', version '3.0.0-preview8.19405.7' was not found.

The output of my dotnet --info:
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview8-013656
Commit: 8bf06ffc8d

Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: linux-x64
Base Path: /opt/dotnet/sdk/3.0.100-preview8-013656/

Host (useful for support):
Version: 3.0.0-preview8-28405-07
Commit: d01b2fb7bc

.NET Core SDKs installed:
3.0.100-preview8-013656 [/opt/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.NETCore.App 2.2.6 [/opt/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview8-28405-07 [/opt/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

@MythicalSora Strange - it looks like you're missing the ASP.NET Core shared framework. What steps did you follow to install the .NET Core 3.0 Preview 8 SDK?

To try to address the issue can you try doing a repair on the .NET Core 3.0 Preview 8 SDK installation?

Going by the os name and the install location, I think @MythicalSora used the dotnet-sdk-preview package for ArchLinux. That package seems to be missing a dependency. Installing aspnet-runtime-preview should help.

Closing older announcement issues.

Was this page helpful?
0 / 5 - 0 ratings