Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Update view compilation error message #5825

Merged
merged 2 commits into from
Feb 23, 2017
Merged

Update view compilation error message #5825

merged 2 commits into from
Feb 23, 2017

Conversation

martincostello
Copy link
Contributor

After encountering dotnet/sdk#120, I noticed that the error message had not been updated to the MSBuild project system from project.json.

This PR updates the error message for the latest SDK.

Update view compilation error message for csproj instead of
project.json.
@dnfclas
Copy link

dnfclas commented Feb 18, 2017

Hi @martincostello, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

@pranavkm
Copy link
Contributor

Should it say "... in the project file." instead of specifying "csproj" since views are not really not tied to the C# project system? Also, should we encourage users to use the Web.Sdk? Might not apply in your scenario, but in general it's what we'd expect most users to use and that would set this property up for you.

cc @Eilon

@martincostello
Copy link
Contributor Author

Yeah, I wasn't exactly sure what the replacement wording should be. I'll update the PR with different text once you've got a decided alternative.

@Eilon
Copy link
Member

Eilon commented Feb 20, 2017

@pranavkm let's discuss on Tuesday so I can understand this better.

@davidfowl
Copy link
Member

@Eilon It's pretty simple, the error message says to turn on preserveCompilationContext in the buildOptions section of project.json. The error message needs to be updated to be msbuild project file relevant.

@@ -201,7 +201,7 @@
<value>A circular layout reference was detected when rendering '{0}'. The layout page '{1}' has already been rendered.</value>
</data>
<data name="Compilation_DependencyContextIsNotSpecified" xml:space="preserve">
<value>One or more compilation references are missing. Possible causes include a missing '{0}' property under '{1}' in the application's {2}.</value>
<value>One or more compilation references are missing. Possible causes include a missing '{0}' property in the application's '{1}' file.</value>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spoke to @Eilon and we came up with this:

One or more compilation references are missing. Ensure that your project is referencing '{0}' and the '{1}' property is not set to false.

{0} - Microsoft.NET.Sdk.Web
{1} - PreserveCompilationContext

that get passed in.

`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thank you. I will update the PR shortly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in b9e5af4.

Update error message based on PR feedback to less C# specific.
@martincostello
Copy link
Contributor Author

@pranavkm Have updated the message as requested. Do you need me to rebase/merge from dev into this PR or not, as I think I forked it last weekend when the CI was broken.

@pranavkm
Copy link
Contributor

Thanks for the update! I'll rebase it as part of merging it once Travis and AppVeyor pass.

@pranavkm pranavkm merged commit 498c1c5 into aspnet:dev Feb 23, 2017
@pranavkm
Copy link
Contributor

Thanks for the PR!

@martincostello martincostello deleted the Fix-Error-Message branch February 23, 2017 22:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants