Skip to content
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

Remove the "CompileTypescript" from Windows #1173

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

btiteux
Copy link
Collaborator

@btiteux btiteux commented May 26, 2024

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • New feature or enhancement
  • UI change (please include screenshot!)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Internationalization and localization
  • Other (please describe):

What is the current behavior?

Issue Number: #1170

What is the new behavior?

  • We now detect if we are compiling DevToys.Blazor on MacOs and if it's the case we enable the CompileTypescript

Other information

Severity	Code	Description	Project	File	Line	Suppression State	Details
Error	MSB4057	The target "CompileTypeScript" does not exist in the project.	DevToys.Blazor	C:\Program Files\Microsoft 
Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	1182		

image

Quality check

Before creating this PR:

  • Did you follow the code style guideline as described in CONTRIBUTING.md
  • Did you build the app and test your changes?
  • Did you check for accessibility? On Windows, you can use Accessibility Insights for this.
  • Did you verify that the change work in Release build configuration
  • Did you verify that all unit tests pass
  • If necessary and if possible, did you verify your changes on:
    • Windows
    • macOS
    • Linux

@btiteux btiteux linked an issue May 26, 2024 that may be closed by this pull request
@btiteux btiteux marked this pull request as draft May 26, 2024 19:29
Get-ChildItem $PSScriptRoot\src\ -rec |? { $_.FullName.EndsWith('DevToys.Blazor.csproj') } |% {
Write-Host "Installing node modules for $($_)..."
ExecSafe { & npm install $_.Directory }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why doing this? We already do this on dotnet restore. See here:

<!-- Target ran on `dotnet restore -p:RestoreNpm=true` -->
<Target Name="NodeJsRestoreTarget" AfterTargets="_GenerateRestoreProjectSpec" Condition="$(RestoreNpm) == 'true'">
<!-- Verify that Node.JS is installed. -->
<Exec Command="node --version" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
</Exec>
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
<!-- Restore Node.JS dependencies. -->
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
<Exec WorkingDirectory="$(ProjectDir)" Command="npm install" />
</Target>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build Failure (DevToys.Blazor)
2 participants