Skip to content
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
c89402d
Enable VS source debugging for SDK-style projects (full PDB + F5 wiring)
danielmeza Jun 16, 2026
ecb7c02
Target v2 firmware: MDP 4.x (NFMRK2) + net8.0 task TFM
danielmeza Jun 16, 2026
6689c72
Add NanoMigrate converter under tools/ (moved from the extension plan…
danielmeza Jun 16, 2026
5ce0c08
NanoMigrate: exit cleanly when there is nothing to convert (reentrancy)
danielmeza Jun 16, 2026
4667760
Split the SDK props/targets into focused modular includes
danielmeza Jun 16, 2026
a733b93
NanoMigrate: Spectre.Console UI + --glob filtering + test-first workflow
danielmeza Jun 16, 2026
cc60824
Replace the binary .skill with a proper text skill; drop nano-migrate.py
danielmeza Jun 16, 2026
a647853
Restructure NanoMigrate into Core (library) + Cli (Spectre.Cli) + Tes…
danielmeza Jun 16, 2026
4d1fb24
NanoMigrate: solution-aware migration (.sln + .slnx input/output)
danielmeza Jun 16, 2026
b4de030
skill: document solution-aware migration (.sln/.slnx input, selection)
danielmeza Jun 16, 2026
ce08e9c
NanoMigrate: packages.config-first resolution + Central Package Manag…
danielmeza Jun 16, 2026
1fc58bd
NanoMigrate: pass through all non-boilerplate properties (fixes dropp…
danielmeza Jun 16, 2026
b50a97c
NanoMigrate: harden item/import handling so migrated samples build
danielmeza Jun 16, 2026
58b5afd
SDK: also define NANOFRAMEWORK_1_0 for source compatibility
danielmeza Jun 16, 2026
48b8b40
Add the dotnet-nano umbrella tool (built-in migrate + external nanoff…
danielmeza Jun 16, 2026
87f26ee
NanoMigrate: build-verification, user-confirmed rollback, and a clean…
danielmeza Jun 16, 2026
d72da89
NanoMigrate: read/write solutions via Microsoft.VisualStudio.Solution…
danielmeza Jun 16, 2026
ceab679
NanoMigrate.Core: reorganize into vertical-slice feature folders
danielmeza Jun 16, 2026
48d5817
NanoMigrate: migrate --report <path> (Markdown or HTML)
danielmeza Jun 16, 2026
b7136f2
NanoMigrate: --no-backup fully suppresses loose .bak; clean ignores j…
danielmeza Jun 16, 2026
4a1883f
Move the dotnet-nano umbrella to tools/nano (out of src/)
danielmeza Jun 16, 2026
967078f
Rename the migrate tool grouping dir: tools/NanoMigrate -> tools/migrate
danielmeza Jun 16, 2026
dc47d40
docs(skill): update tool path tools/NanoMigrate -> tools/migrate
danielmeza Jun 16, 2026
7c05b4a
docs: add nano + nano-migrate tool READMEs; expand migration skill
danielmeza Jun 16, 2026
934b9a3
Wrk CI-CD
josesimoes Jun 18, 2026
ea7fcd1
Move the dotnet nano and nano-migrate tools to nanoframework/nf-tools
danielmeza Jun 23, 2026
f1f9632
Merge branch 'main' into move-to-sdk
danielmeza Jun 23, 2026
5209ab5
Merge branch 'main' into move-to-sdk
josesimoes Jun 23, 2026
dfdc011
Update Microsoft.Build refs to latest 17.x
josesimoes Jun 23, 2026
466e590
Remove unnecessary comment
josesimoes Jun 23, 2026
1114975
Update MDP ref to 4.0.0-preview.98
josesimoes Jun 23, 2026
d9ad850
Fix AZDO pipeline
josesimoes Jun 23, 2026
b142c32
Fix nuget config to allow local build
josesimoes Jun 23, 2026
4a546ac
Work CI-CD
josesimoes Jun 23, 2026
8cad910
Merge branch 'main' of https://github.com/nanoframework/nanoFramework…
josesimoes Jun 23, 2026
5d4318f
Work CI-CD
josesimoes Jun 23, 2026
86a9f92
Merge branch 'main' of https://github.com/nanoframework/nanoFramework…
josesimoes Jun 23, 2026
a93677a
Work CI-CD
josesimoes Jun 23, 2026
ce2eb05
Merge branch 'main' of https://github.com/nanoframework/nanoFramework…
josesimoes Jun 23, 2026
2bc2dc4
Work CI-CD
josesimoes Jun 23, 2026
7447c74
Merge branch 'main' of https://github.com/nanoframework/nanoFramework…
josesimoes Jun 23, 2026
7e6eff5
Work CI-CD
josesimoes Jun 23, 2026
48be656
Merge branch 'main' of https://github.com/nanoframework/nanoFramework…
josesimoes Jun 23, 2026
0bfd85c
Work CI-CD
josesimoes Jun 23, 2026
58ae5dc
Merge branch 'main' of https://github.com/nanoframework/nanoFramework…
josesimoes Jun 23, 2026
653ab09
Merge branch 'main' of https://github.com/nanoframework/nanoFramework…
josesimoes Jun 23, 2026
476d9f3
SDK: guard against a v1 MetadataProcessor on the v2 toolchain
danielmeza Jun 23, 2026
a12e49a
SDK: mark only the application project as deployable
danielmeza Jun 23, 2026
8fd3ba8
SDK: split the build pipeline into focused modules
danielmeza Jun 23, 2026
7151a0b
Remove unused editor
josesimoes Jun 24, 2026
2636204
Fix lincese header
josesimoes Jun 24, 2026
13d1272
Add license headers to SDK files
josesimoes Jun 24, 2026
8c200cf
No need for this guard
josesimoes Jun 24, 2026
c1db85e
Add warning about modification to SDK files
josesimoes Jun 24, 2026
ea5f3ab
Fix comment style
josesimoes Jun 24, 2026
2f4f4dd
Removing as nugets for v2 libs are using tge TFM folder
josesimoes Jun 24, 2026
ea02c64
General renames for consistency and clarification
josesimoes Jun 24, 2026
fb8344e
Fixes from code review
josesimoes Jun 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ Or pin the SDK version in `global.json`:

```
src/
nanoFramework.Sdk/ SDK NuGet package (Sdk.props / Sdk.targets)
nanoFramework.NET.Sdk/ SDK NuGet package (Sdk.props / Sdk.targets)
nanoFramework.Tools.BuildTasks/ Custom MSBuild tasks (resource gen, binary output, etc.)
```

## Tools

The `dotnet nano` umbrella CLI and the `nano-migrate` project migrator (with the companion
SDK-migration skill) live in the [nanoframework/nf-tools](https://github.com/nanoframework/nf-tools)
repository, under `tools/nano` and `tools/migrate`.

## Development

```bash
Expand Down
41 changes: 41 additions & 0 deletions src/nanoFramework.NET.Sdk/Sdk/Rules/NanoDebugger.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) .NET Foundation and Contributors.
Partial Copyright, Microsoft Corporation, All rights reserved.
See LICENSE file in the project root for full license information.
-->
<Rule
Name="NanoDebugger"
DisplayName=".NET nanoFramework Device"
PageTemplate="debugger"
Description=".NET nanoFramework Device debugger options"
xmlns="http://schemas.microsoft.com/build/2009/properties">
<Rule.DataSource>
<DataSource Persistence="UserFileWithXamlDefaults" />
</Rule.DataSource>

<StringProperty Name="NanoDebuggerCommand" DisplayName="Command"
Default="$(TargetPath)"
Description="The debug command to execute.">
<StringProperty.ValueEditors>
<ValueEditor EditorType="DefaultStringPropertyEditor" DisplayName="&lt;Edit...&gt;"/>
<ValueEditor EditorType="DefaultFilePropertyEditor" DisplayName="&lt;Browse...&gt;">
<ValueEditor.Metadata>
<NameValuePair Name="Filters" Value="Executables (*.exe)|*.exe" />
</ValueEditor.Metadata>
</ValueEditor>
</StringProperty.ValueEditors>
</StringProperty>

<StringProperty Name="NanoDebuggerCommandArguments" DisplayName="Command Arguments"
Description="The command line arguments to pass to the application.">
<Argument Property="NanoDebuggerCommand" />
</StringProperty>
<StringProperty Name="NanoDebuggerWorkingDirectory" DisplayName="Working Directory"
Default="$(MSBuildProjectDirectory)"
Description="The application's working directory. By default, the directory containing the project file."
Subtype="folder"/>
<BoolProperty Name="NanoDebuggerDebuggerAttach" DisplayName="Attach"
Default="False"
Description="Specifies whether the debugger should attempt to attach to an existing process when debugging starts." />
</Rule>
135 changes: 42 additions & 93 deletions src/nanoFramework.NET.Sdk/Sdk/Sdk.props
Original file line number Diff line number Diff line change
@@ -1,86 +1,69 @@
<Project>
<!--
nanoFramework SDK - Sdk.props
Copyright (c) .NET Foundation and Contributors.
See LICENSE file in the project root for full license information.
-->
<Project>
<!--
nanoFramework SDK - Sdk.props (thin orchestrator)
Auto-imported at the top of SDK-style nanoFramework projects.

********************************************************************************
WARNING: DO NOT MODIFY this file unless you understand MSBuild targets.
Incorrect changes will break .NET nanoFramework project builds.
********************************************************************************

Strategy: Use Microsoft.NET.Sdk as the base SDK for standard MSBuild
infrastructure (NuGet restore, PackageReference, implicit globs, pack).
Override the TFM, compiler flags, and add nanoFramework-specific properties.

This file is a thin orchestrator: it owns the Microsoft.NET.Sdk props import
chain (so the legacy NFProjectSystem.CSharp.targets double-import cannot occur)
and <Import>s the focused module that carries the TFM identity. The matching
targets-time modules (MDP pipeline, CPS capabilities) are imported from
Sdk.targets, where project-body values like NanoIsCoreLibrary / TargetName have
been set.
-->

<!-- ============================================================ -->
<!-- Pre-SDK properties (set BEFORE Microsoft.NET.Sdk import) -->
<!-- Pre-SDK properties (set BEFORE Microsoft.NET.Sdk import) -->
<!-- ============================================================ -->
<PropertyGroup>
<TargetFramework Condition="'$(TargetFramework)' == ''">netnano1.0</TargetFramework>

<!-- Disable .NET framework reference resolution — nanoFramework has its own mscorlib -->
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>

<!--
Existing nanoFramework NuGet packages place files in a flat lib\ directory
(no TFM subfolder). NuGet interprets those as ".NETFramework,Version=v0.0".
AssetTargetFallback tells NuGet: if no netnano1.0 assets exist, accept "net" assets.
VS source-level debugging of nanoFramework projects resolves source<->IL from a
*Windows/full* PDB. Emit one for Debug. This MUST be set before the Microsoft.NET.Sdk
import below (that SDK defaults DebugType=portable when empty, so its default must be
pre-empted). Built in VS (.NET-Framework csc) `full` yields a Windows PDB and source
breakpoints bind; a portable PDB makes VS bind at the method entry only (one startup
hit, never on the line). Under `dotnet build` (.NET-Core csc) `full` still emits
portable, but the CLI doesn't debug — so Debug=full is the correct default. VS passes
Configuration as a global property, so it's set here; Release/CLI fall through to portable.
-->
<AssetTargetFallback Condition="'$(AssetTargetFallback)' == ''">net</AssetTargetFallback>

<!-- Suppress NU1701 warning for the expected fallback -->
<NoWarn>$(NoWarn);NU1701</NoWarn>
<DebugType Condition="'$(DebugType)' == '' and '$(Configuration)' == 'Debug'">full</DebugType>
</PropertyGroup>

<!-- ============================================================ -->
<!-- Import Microsoft.NET.Sdk base infrastructure -->
<!-- Import Microsoft.NET.Sdk base infrastructure -->
<!-- ============================================================ -->
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />

<!-- ============================================================ -->
<!-- SDK root paths (used to locate bundled task DLLs) -->
<!-- SDK root paths (used to locate bundled task DLLs and to -->
<!-- redirect framework-directory resolution — consumed by the -->
<!-- TFM module below and the MDP module in Sdk.targets) -->
<!-- ============================================================ -->
<PropertyGroup>
<_NfSdkDir>$(MSBuildThisFileDirectory)</_NfSdkDir>
<_NfSdkRoot>$(MSBuildThisFileDirectory)..\</_NfSdkRoot>
</PropertyGroup>

<!-- ============================================================ -->
<!-- nanoFramework Target Framework Identity -->
<!-- (override whatever Microsoft.NET.Sdk inferred) -->
<!-- ============================================================ -->
<PropertyGroup>
<TargetFrameworkIdentifier>.NETnanoFramework</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<TargetFrameworkMoniker>.NETnanoFramework,Version=$(TargetFrameworkVersion)</TargetFrameworkMoniker>
<TargetFrameworkMonikerDisplayName>.NET nanoFramework 1.0</TargetFrameworkMonikerDisplayName>
<NuGetTargetMoniker>.NETnanoFramework,Version=$(TargetFrameworkVersion)</NuGetTargetMoniker>
</PropertyGroup>

<!-- ============================================================ -->
<!-- C# Compiler settings for nanoFramework -->
<!-- nanoFramework target-framework identity -->
<!-- (TFM moniker + compiler/TFM-shaping props) -->
<!-- ============================================================ -->
<PropertyGroup>
<LangVersion Condition="'$(LangVersion)' == ''">13.0</LangVersion>

<!-- Prevent standard .NET library references — nanoFramework provides its own mscorlib -->
<NoStdLib>true</NoStdLib>
<NoCompilerStandardLib>true</NoCompilerStandardLib>
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>

<!-- Disable .NET Framework-specific features -->
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<DisableHandlePackageFileConflicts>true</DisableHandlePackageFileConflicts>

<!-- Required for Roslyn to compile without a standard class library -->
<TargetingClr2Framework>true</TargetingClr2Framework>

<!--
Point framework directories to the SDK folder (which has no .NET assemblies).
Prevents the compiler from accidentally resolving standard .NET types.
-->
<_TargetFrameworkDirectories>$(_NfSdkDir)</_TargetFrameworkDirectories>
<_FullFrameworkReferenceAssemblyPaths>$(_NfSdkDir)</_FullFrameworkReferenceAssemblyPaths>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)nanoFramework.Tfm.props" />

<!-- ============================================================ -->
<!-- Visual Studio / IDE settings -->
<!-- Visual Studio / IDE settings -->
<!-- ============================================================ -->
<PropertyGroup>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
Expand All @@ -90,47 +73,13 @@
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>

<!-- Roslyn core assembly support (.rsp file) — actual setting moved to Sdk.targets -->

<!--
NOTE: Core assembly (mscorlib) suppressions for GenerateAssembly*Attribute
are in Sdk.targets because IsCoreAssembly is set in the project file,
which is evaluated AFTER Sdk.props but BEFORE Sdk.targets.
-->

<!-- ============================================================ -->
<!-- Metadata Processor defaults -->
<!-- NOTE: NanoIsCoreLibrary-dependent defaults are in Sdk.targets -->
<!-- because the property is set in the project file. -->
<!-- ============================================================ -->
<PropertyGroup>
<NFMDP_PE_Verbose Condition="'$(NFMDP_PE_Verbose)' == ''">false</NFMDP_PE_Verbose>
<NFMDP_PE_VerboseMinimize Condition="'$(NFMDP_PE_VerboseMinimize)' == ''">false</NFMDP_PE_VerboseMinimize>
</PropertyGroup>

<!-- Stub/skeleton path defaults (project-independent) -->
<PropertyGroup>
<NanoGenerateStubsDirectory Condition="'$(NanoGenerateStubsDirectory)' == ''">$(ProjectDir)Stubs</NanoGenerateStubsDirectory>
</PropertyGroup>
<!--
NOTE: NanoGenerateStubsRootName, NanoGenerateSkeletonProjectName, and
NanoGenerateSkeletonFile depend on $(TargetName) which is set after Sdk.props.
These defaults are in Sdk.targets.
NOTE: Core assembly (mscorlib) suppressions for GenerateAssembly*Attribute,
the NanoIsCoreLibrary-dependent MDP defaults, TargetName-derived stub paths,
and the MDP PackageReference all depend on values set in the project file
(evaluated AFTER Sdk.props). They live in the targets-time modules
(nanoFramework.Mdp.targets / nanoFramework.Capabilities.targets) imported from
Sdk.targets — NOT here.
-->

<!-- ============================================================ -->
<!-- Auto-inject MetadataProcessor package reference -->
<!-- ============================================================ -->
<PropertyGroup>
<NanoFrameworkMDPVersion Condition="'$(NanoFrameworkMDPVersion)' == ''">3.0.29</NanoFrameworkMDPVersion>
</PropertyGroup>
<ItemGroup Condition="'$(NF_MDP_MSBUILDTASK_PATH)' == '' and '$(DisableNanoFrameworkMDP)' != 'true'">
<PackageReference Include="nanoFramework.Tools.MetadataProcessor.MsBuildTask"
Version="$(NanoFrameworkMDPVersion)"
PrivateAssets="all"
GeneratePathProperty="true"
ExcludeAssets="runtime;compile;build;buildTransitive"
IsImplicitlyDefined="true" />
</ItemGroup>

</Project>
Loading