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

Support suppressing transitive framework reference downloads, and other changes #25358

Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
38 changes: 38 additions & 0 deletions src/Assets/TestProjects/WindowsFormsTestApp/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/Assets/TestProjects/WindowsFormsTestApp/Form1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace WindowsFormsTestApp;

public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
16 changes: 16 additions & 0 deletions src/Assets/TestProjects/WindowsFormsTestApp/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace WindowsFormsTestApp;

static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new Form1());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

</Project>
14 changes: 13 additions & 1 deletion src/Tasks/Common/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ The following are names of parameters or literal values and should not be transl
<comment>{StrBegin="NETSDK1099: "}</comment>
</data>
<data name="WindowsDesktopFrameworkRequiresWindows" xml:space="preserve">
<value>NETSDK1100: Windows is required to build Windows desktop applications.</value>
<value>NETSDK1100: To build a project targeting Windows on this operating system, set the EnableWindowsTargeting property to true.</value>
<comment>{StrBegin="NETSDK1100: "}</comment>
</data>
<data name="ILLink_Info" xml:space="preserve">
Expand Down Expand Up @@ -832,4 +832,16 @@ You may need to build the project on another operating system or architecture, o
<value>NETSDK1182: Targeting .NET 6.0 or higher in Visual Studio 2019 is not supported.</value>
<comment>{StrBegin="NETSDK1182: "}</comment>
</data>
<data name="TargetingPackNotRestored_TransitiveDisabled" xml:space="preserve">
<value>NETSDK1183: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</value>
<comment>{StrBegin="NETSDK1183: "}</comment>
</data>
<data name="RuntimePackNotRestored_TransitiveDisabled" xml:space="preserve">
<value>NETSDK1184: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</value>
<comment>{StrBegin="NETSDK1184: "}</comment>
</data>
<data name="UnknownFrameworkReference_MauiEssentials" xml:space="preserve">
<value>NETSDK1185: This project depends on Maui Essentials through a project or NuGet package reference. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary).</value>
Copy link
Member

Choose a reason for hiding this comment

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

This message doesn't say why there's a problem, and the other ones do (which is a good thing). I think we can unify the tone by adding a brief section on why this is a problem.

Suggested change
<value>NETSDK1185: This project depends on Maui Essentials through a project or NuGet package reference. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary).</value>
<value>NETSDK1185: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary).</value>

<comment>{StrBegin="NETSDK1185: "}</comment>
</data>
</root>
19 changes: 17 additions & 2 deletions src/Tasks/Common/Resources/xlf/Strings.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1112: Balíček modulu runtime pro {0} se nestáhl. Zkuste spustit obnovení NuGet s identifikátorem RuntimeIdentifier {1}.</target>
<note>{StrBegin="NETSDK1112: "}</note>
</trans-unit>
<trans-unit id="RuntimePackNotRestored_TransitiveDisabled">
<source>NETSDK1184: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</source>
<target state="new">NETSDK1184: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</target>
<note>{StrBegin="NETSDK1184: "}</note>
</trans-unit>
<trans-unit id="SelfContainedExeCannotReferenceNonSelfContained">
<source>NETSDK1150: The referenced project '{0}' is a non self-contained executable. A non self-contained executable cannot be referenced by a self-contained executable. For more information, see https://aka.ms/netsdk1150</source>
<target state="translated">NETSDK1150: odkazovaný projekt {0} je spustitelný soubor, který není samostatně obsažený. Na spustitelný soubor, který není samostatně obsažený, nelze odkazovat pomocí samostatně obsaženého spustitelného souboru. Další informace najdete na https://aka.ms/netsdk1150</target>
Expand Down Expand Up @@ -775,6 +780,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1127: Targeting Pack {0} není nainstalovaný. Obnovte ho prosím a zkuste to znovu.</target>
<note>{StrBegin="NETSDK1127: "}</note>
</trans-unit>
<trans-unit id="TargetingPackNotRestored_TransitiveDisabled">
<source>NETSDK1183: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</source>
<target state="new">NETSDK1183: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</target>
<note>{StrBegin="NETSDK1183: "}</note>
</trans-unit>
<trans-unit id="TrimmingWindowsFormsIsNotSupported">
<source>NETSDK1175: Windows Forms is not supported or recommended with trimming enabled. Please go to https://aka.ms/dotnet-illink/windows-forms for more details.</source>
<target state="translated">NETSDK1175: Model Windows Forms se nepodporuje nebo se nedoporučuje používat, pokud je povoleno ořezávání. Přejděte prosím na https://aka.ms/dotnet-illink/windows-forms, kde najdete další podrobnosti.</target>
Expand Down Expand Up @@ -810,6 +820,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1073: Odkaz FrameworkReference {0} se nerozpoznal.</target>
<note>{StrBegin="NETSDK1073: "}</note>
</trans-unit>
<trans-unit id="UnknownFrameworkReference_MauiEssentials">
<source>NETSDK1185: This project depends on Maui Essentials through a project or NuGet package reference. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary).</source>
<target state="new">NETSDK1185: This project depends on Maui Essentials through a project or NuGet package reference. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary).</target>
<note>{StrBegin="NETSDK1185: "}</note>
</trans-unit>
<trans-unit id="UnnecessaryWindowsDesktopSDK">
<source>NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Consider changing the Sdk attribute of the root Project element to 'Microsoft.NET.Sdk'.</source>
<target state="translated">NETSDK1137: Sadu Microsoft.NET.Sdk.WindowsDesktop SDK už není nutné používat. Zvažte možnost změnit atribut SDK kořenového elementu Project na Microsoft.NET.Sdk.</target>
Expand Down Expand Up @@ -886,8 +901,8 @@ The following are names of parameters or literal values and should not be transl
<note>{StrBegin="NETSDK1105: "}</note>
</trans-unit>
<trans-unit id="WindowsDesktopFrameworkRequiresWindows">
<source>NETSDK1100: Windows is required to build Windows desktop applications.</source>
<target state="translated">NETSDK1100: K sestavování desktopových aplikací pro Windows se vyžaduje systém Windows.</target>
<source>NETSDK1100: To build a project targeting Windows on this operating system, set the EnableWindowsTargeting property to true.</source>
<target state="needs-review-translation">NETSDK1100: K sestavování desktopových aplikací pro Windows se vyžaduje systém Windows.</target>
<note>{StrBegin="NETSDK1100: "}</note>
</trans-unit>
<trans-unit id="WindowsDesktopTargetPlatformMustBeWindows">
Expand Down
19 changes: 17 additions & 2 deletions src/Tasks/Common/Resources/xlf/Strings.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1112: Das Laufzeitpaket für "{0}" wurde nicht heruntergeladen. Führen Sie eine NuGet-Wiederherstellung mit RuntimeIdentifier "{1}" aus.</target>
<note>{StrBegin="NETSDK1112: "}</note>
</trans-unit>
<trans-unit id="RuntimePackNotRestored_TransitiveDisabled">
<source>NETSDK1184: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</source>
<target state="new">NETSDK1184: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</target>
<note>{StrBegin="NETSDK1184: "}</note>
</trans-unit>
<trans-unit id="SelfContainedExeCannotReferenceNonSelfContained">
<source>NETSDK1150: The referenced project '{0}' is a non self-contained executable. A non self-contained executable cannot be referenced by a self-contained executable. For more information, see https://aka.ms/netsdk1150</source>
<target state="translated">NETSDK1150: Das referenzierte Projekt „{0}“ ist keine eigenständige ausführbare Datei. Auf eine nicht eigenständige ausführbare Datei kann nicht von einer eigenständigen ausführbaren Datei verwiesen werden. Weitere Informationen finden Sie unter https://aka.ms/netsdk1150.</target>
Expand Down Expand Up @@ -775,6 +780,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1127: Das Paket zur Festlegung von Zielversionen "{0}" ist nicht installiert. Führen Sie eine Wiederherstellung durch, und versuchen Sie es noch mal.</target>
<note>{StrBegin="NETSDK1127: "}</note>
</trans-unit>
<trans-unit id="TargetingPackNotRestored_TransitiveDisabled">
<source>NETSDK1183: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</source>
<target state="new">NETSDK1183: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</target>
<note>{StrBegin="NETSDK1183: "}</note>
</trans-unit>
<trans-unit id="TrimmingWindowsFormsIsNotSupported">
<source>NETSDK1175: Windows Forms is not supported or recommended with trimming enabled. Please go to https://aka.ms/dotnet-illink/windows-forms for more details.</source>
<target state="translated">NETSDK1175: Windows Forms wird nicht unterstützt oder empfohlen, wenn das Zuschneiden aktiviert ist. Weitere Details finden Sie unter https://aka.ms/dotnet-illink/windows-forms.</target>
Expand Down Expand Up @@ -810,6 +820,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1073: Die FrameworkReference "{0}" wurde nicht erkannt.</target>
<note>{StrBegin="NETSDK1073: "}</note>
</trans-unit>
<trans-unit id="UnknownFrameworkReference_MauiEssentials">
<source>NETSDK1185: This project depends on Maui Essentials through a project or NuGet package reference. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary).</source>
<target state="new">NETSDK1185: This project depends on Maui Essentials through a project or NuGet package reference. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary).</target>
<note>{StrBegin="NETSDK1185: "}</note>
</trans-unit>
<trans-unit id="UnnecessaryWindowsDesktopSDK">
<source>NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Consider changing the Sdk attribute of the root Project element to 'Microsoft.NET.Sdk'.</source>
<target state="translated">NETSDK1137: Es ist nicht länger erforderlich, das Microsoft.NET.Sdk.WindowsDesktop SDK zu verwenden. Erwägen Sie eine Änderung des Sdk-Attributs für das root-Projektelement in "Microsoft.NET.Sdk".</target>
Expand Down Expand Up @@ -886,8 +901,8 @@ The following are names of parameters or literal values and should not be transl
<note>{StrBegin="NETSDK1105: "}</note>
</trans-unit>
<trans-unit id="WindowsDesktopFrameworkRequiresWindows">
<source>NETSDK1100: Windows is required to build Windows desktop applications.</source>
<target state="translated">NETSDK1100: Windows ist zum Erstellen von Windows-Desktopanwendungen erforderlich.</target>
<source>NETSDK1100: To build a project targeting Windows on this operating system, set the EnableWindowsTargeting property to true.</source>
<target state="needs-review-translation">NETSDK1100: Windows ist zum Erstellen von Windows-Desktopanwendungen erforderlich.</target>
<note>{StrBegin="NETSDK1100: "}</note>
</trans-unit>
<trans-unit id="WindowsDesktopTargetPlatformMustBeWindows">
Expand Down
19 changes: 17 additions & 2 deletions src/Tasks/Common/Resources/xlf/Strings.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1112: no se descargó el paquete de tiempo de ejecución de {0}. Pruebe a ejecutar una restauración de NuGet con RuntimeIdentifier "{1}".</target>
<note>{StrBegin="NETSDK1112: "}</note>
</trans-unit>
<trans-unit id="RuntimePackNotRestored_TransitiveDisabled">
<source>NETSDK1184: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</source>
<target state="new">NETSDK1184: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</target>
<note>{StrBegin="NETSDK1184: "}</note>
</trans-unit>
<trans-unit id="SelfContainedExeCannotReferenceNonSelfContained">
<source>NETSDK1150: The referenced project '{0}' is a non self-contained executable. A non self-contained executable cannot be referenced by a self-contained executable. For more information, see https://aka.ms/netsdk1150</source>
<target state="translated">NETSDK1150: El proyecto al que se hace referencia '{0}' es un ejecutable no independiente. Un archivo ejecutable independiente no puede hacer referencia a un ejecutable que no es independiente. Para obtener más información, consulte https://aka.ms/netsdk1150</target>
Expand Down Expand Up @@ -775,6 +780,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1127: El paquete de compatibilidad {0} no está instalado. Restáurelo y vuelva a intentarlo.</target>
<note>{StrBegin="NETSDK1127: "}</note>
</trans-unit>
<trans-unit id="TargetingPackNotRestored_TransitiveDisabled">
<source>NETSDK1183: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</source>
<target state="new">NETSDK1183: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.</target>
<note>{StrBegin="NETSDK1183: "}</note>
</trans-unit>
<trans-unit id="TrimmingWindowsFormsIsNotSupported">
<source>NETSDK1175: Windows Forms is not supported or recommended with trimming enabled. Please go to https://aka.ms/dotnet-illink/windows-forms for more details.</source>
<target state="translated">NETSDK1175: Windows Forms no es compatible o no se recomienda con la opción de recorte habilitada. Para obtener más información, vaya a https://aka.ms/dotnet-illink/windows-forms.</target>
Expand Down Expand Up @@ -810,6 +820,11 @@ The following are names of parameters or literal values and should not be transl
<target state="translated">NETSDK1073: No se reconoció el valor de FrameworkReference "{0}"</target>
<note>{StrBegin="NETSDK1073: "}</note>
</trans-unit>
<trans-unit id="UnknownFrameworkReference_MauiEssentials">
<source>NETSDK1185: This project depends on Maui Essentials through a project or NuGet package reference. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary).</source>
<target state="new">NETSDK1185: This project depends on Maui Essentials through a project or NuGet package reference. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary).</target>
<note>{StrBegin="NETSDK1185: "}</note>
</trans-unit>
<trans-unit id="UnnecessaryWindowsDesktopSDK">
<source>NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Consider changing the Sdk attribute of the root Project element to 'Microsoft.NET.Sdk'.</source>
<target state="translated">NETSDK1137: Ya no es necesario usar el SDK de Microsoft.NET.Sdk.WindowsDesktop. Puede cambiar el atributo Sdk del elemento del proyecto raíz a "Microsoft.NET.Sdk".</target>
Expand Down Expand Up @@ -886,8 +901,8 @@ The following are names of parameters or literal values and should not be transl
<note>{StrBegin="NETSDK1105: "}</note>
</trans-unit>
<trans-unit id="WindowsDesktopFrameworkRequiresWindows">
<source>NETSDK1100: Windows is required to build Windows desktop applications.</source>
<target state="translated">NETSDK1100: Se requiere Windows para compilar las aplicaciones de escritorio de Windows.</target>
<source>NETSDK1100: To build a project targeting Windows on this operating system, set the EnableWindowsTargeting property to true.</source>
<target state="needs-review-translation">NETSDK1100: Se requiere Windows para compilar las aplicaciones de escritorio de Windows.</target>
<note>{StrBegin="NETSDK1100: "}</note>
</trans-unit>
<trans-unit id="WindowsDesktopTargetPlatformMustBeWindows">
Expand Down
Loading