Skip to content

Print a warning if FindAssembliesWithReferencesTo cannot find file #11226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pranavkm opened this issue Jun 14, 2019 · 2 comments · Fixed by dotnet/razor#702
Closed

Print a warning if FindAssembliesWithReferencesTo cannot find file #11226

pranavkm opened this issue Jun 14, 2019 · 2 comments · Fixed by dotnet/razor#702
Assignees
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed

Comments

@pranavkm
Copy link
Contributor

Missing assemblies will fail the build, but since FindAssemblyWithReferencesTo gets first dibs, it throws the exception rather than csc. We should instead consider printing a warning and letting later parts in the build fail.

@Eilon Eilon added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jun 14, 2019
@pranavkm pranavkm added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates bug This issue describes a behavior which is not expected - a bug. and removed area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework labels Jun 25, 2019
pranavkm added a commit to dotnet/razor that referenced this issue Jun 25, 2019
Currently FindAssembliesWithReferencesTo produces a stacktrace when P2P builds fail - for instance
if the referenced project has a compiler error. This changes it to use LogErrorFromException.

In addition, there was a typo in the property that disabled the feature.

Fixes dotnet/aspnetcore#11226
pranavkm added a commit to dotnet/razor that referenced this issue Jun 26, 2019
…702)

Currently FindAssembliesWithReferencesTo produces a stacktrace when P2P builds fail - for instance
if the referenced project has a compiler error. This changes it to use LogErrorFromException.

In addition, there was a typo in the property that disabled the feature.

Fixes dotnet/aspnetcore#11226
@pranavkm pranavkm added the Done This issue has been fixed label Jun 26, 2019
@pranavkm pranavkm self-assigned this Jun 26, 2019
@pranavkm pranavkm added this to the 3.0.0-preview7 milestone Jun 26, 2019
@pranavkm
Copy link
Contributor Author

We went with using LogFromException, so the outcome looks like what csc prints when it cannot find an assembly (instead of a stack trace). Much better.

@pranavkm pranavkm removed the Done This issue has been fixed label Jun 27, 2019
@pranavkm pranavkm removed this from the 3.0.0-preview7 milestone Jun 27, 2019
@pranavkm
Copy link
Contributor Author

Reviving this, the plan here is to print a pretty warning and let the task not fail in the event assemblies are missing. Usually this is indicative of other build issues and we want to avoid getting flooded with issues for random problems.

JunTaoLuo pushed a commit that referenced this issue May 7, 2020
…702)

Currently FindAssembliesWithReferencesTo produces a stacktrace when P2P builds fail - for instance
if the referenced project has a compiler error. This changes it to use LogErrorFromException.

In addition, there was a typo in the property that disabled the feature.

Fixes #11226
JunTaoLuo referenced this issue May 17, 2020
…otnet/razor#702)

Currently FindAssembliesWithReferencesTo produces a stacktrace when P2P builds fail - for instance
if the referenced project has a compiler error. This changes it to use LogErrorFromException.

In addition, there was a typo in the property that disabled the feature.

Fixes https://github.com/aspnet/AspNetCore/issues/11226\n\nCommit migrated from dotnet/razor@87c12a1
dougbu referenced this issue in dougbu/razor-compiler Nov 17, 2021
…otnet/razor#702)

Currently FindAssembliesWithReferencesTo produces a stacktrace when P2P builds fail - for instance
if the referenced project has a compiler error. This changes it to use LogErrorFromException.

In addition, there was a typo in the property that disabled the feature.

Fixes https://github.com/aspnet/AspNetCore/issues/11226\n\nCommit migrated from dotnet/razor@87c12a1

Commit migrated from dotnet/aspnetcore@4e16cfd4daf0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants