amaletski.nanoFramework.MSBuildTasks 0.1.4

dotnet add package amaletski.nanoFramework.MSBuildTasks --version 0.1.4
NuGet\Install-Package amaletski.nanoFramework.MSBuildTasks -Version 0.1.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="amaletski.nanoFramework.MSBuildTasks" Version="0.1.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add amaletski.nanoFramework.MSBuildTasks --version 0.1.4
#r "nuget: amaletski.nanoFramework.MSBuildTasks, 0.1.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install amaletski.nanoFramework.MSBuildTasks as a Cake Addin
#addin nuget:?package=amaletski.nanoFramework.MSBuildTasks&version=0.1.4

// Install amaletski.nanoFramework.MSBuildTasks as a Cake Tool
#tool nuget:?package=amaletski.nanoFramework.MSBuildTasks&version=0.1.4

License NuGet

nanoFramework.MSBuildTasks

Package Installation (Visual Studio)

  • Install the NuGet package as usual.
  • Unload the project:
    • Right-click the project in the "Solution Explorer" window.
    • Select "Unload Project".
  • Open the project file:
    • Right-click the unloaded project in the "Solution Explorer" window.
    • Select "Edit Project File".
  • Add props and targets imports in the nfproj:
    • Add the following Import after the last props Import node (somewhere at the top of the project node).
         <Import Project="..\packages\amaletski.nanoFramework.MSBuildTasks.[PackageVersion]\build\netnano1.0\amaletski.nanoFramework.MSBuildTasks.props" />
      
      Note: Replace [PackageVersion] with the appropriate version.
    • Add the following Import after the last targets Import node (somewhere at the bottom of the project node).
         <Import Project="..\packages\amaletski.nanoFramework.MSBuildTasks.[PackageVersion]\build\netnano1.0\amaletski.nanoFramework.MSBuildTasks.targets" />
      
      Note: Replace [PackageVersion] with the appropriate version.
    • Press Ctrl+S to save changes.
  • Reload the project:
    • Right click the unloaded project in the "Solution Explorer" window.
    • Select "Reload Project".

[!IMPORTANT] Make sure to update the imports after updating the NuGet package version.

<details> <summary>Why should I do this?</summary>

Without these imports, the package will not work. There are likely some issues with the nanoFramework project system because, according to this Microsoft Docs page, these imports should be managed automatically. </details>

Use Cases

Resource Embedding

To use this feature, nfproj should be updated.

Files that should be included in the embedded resources can be configured through user-defined ResourcesSource elements. All files that match will be embedded as <b>binary</b> resources.

[!NOTE] If there are no ResourcesSource elements in the nfproj, the resx file will not be generated, and resources will not be embedded.

[!TIP] Multiple ResourcesSource elements can be specified in the same nfproj. All matching files will be embedded into the same resources file.

Attributes
Attribute Required Description
Include Required Relative or absolute path to the folder with files to include
RegexFilter Optional Regular expression to filter files within the Include directory.
SearchPattern Optional Search pattern to filter files within the Include directory.

[!WARNING] Do not specify RegexFilter and SearchPattern in the same ResourcesSource as it will cause a validation error.

Optionally, the name of the generated resx file can be overridden through the GeneratedResxFileName custom property. Default value: Resources.resx.

[!NOTE] The generated resx file will be deleted on project/solution clean.

Examples:

<PropertyGroup>
  <GeneratedResxFileName>CustomFileName.resx</GeneratedResxFileName>
</PropertyGroup>
<ItemGroup>
  <ResourcesSource Include="Settings">
    <SearchPattern>*.json</SearchPattern>
  </ResourcesSource>
  <ResourcesSource Include="..\spa\dist" />
</ItemGroup>
Product Compatible and additional computed target framework versions.
.NETnanoFramework netnano1.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.4 102 4/4/2024
0.1.3 100 4/4/2024
0.1.1 96 4/2/2024