小编ree*_*ee6的帖子

AzurePipeline 失败的原因是:找不到 .NETFramework,Version=v4.6.1 的参考程序集

我有一个用于我的构建的 Azure 管道设置。我最近遇到了这个问题,但找不到解决方法:

##[error]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1220,5): Error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
Run Code Online (Sandbox Code Playgroud)

大约一周前,我们的许多构建都失败了,微软改变了一些东西,我们得到了这样的东西:

[error]C:\Users\VssAdministrator\.nuget\packages\codegeneration.roslyn.buildtime\0.6.1\build\CodeGeneration.Roslyn.BuildTime.targets(73,5): Error CGR1001: CodeGeneration.Roslyn.Tool (dotnet-codegen) is not available, code generation won't run. Please check https://github.com/AArnott/CodeGeneration.Roslyn for usage instructions. 
Run Code Online (Sandbox Code Playgroud)

但是能够通过显式添加一个任务来包含 netcore2.1 sdk 来解决这个问题

##[error]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1220,5): Error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.1 were not found. …
Run Code Online (Sandbox Code Playgroud)

yaml build-server azure-devops azure-pipelines azure-pipelines-yaml

22
推荐指数
2
解决办法
1万
查看次数

WPF 切换组合框项目文本颜色 MVVM ReactiveUI

好吧,这绝对是一个新手问题,不幸的是无法找出/找到答案。

本质上是将对象列表绑定到组合框,当Disabled对象上的属性设置为 true 时,我希望将组合框项的文本颜色设置为灰色。

这是我到目前为止所拥有的:

组合框项数据类型

public class ListItem
{
    public ListItem(string text)
    {
        Text = text;
    }

    public string Text { get; set; }
    public bool Disabled { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

视图模型设置


public class MainPageViewModel : ReactiveObject
{
    // In ReactiveUI, this is the syntax to declare a read-write property
    // that will notify Observers, as well as WPF, that a property has 
    // changed. If we declared this as a normal property, we couldn't tell …
Run Code Online (Sandbox Code Playgroud)

c# wpf xaml reactiveui

5
推荐指数
1
解决办法
300
查看次数

由于找不到方法,Azure 构建失败:'System.ReadOnlySpan`1<Char> Microsoft.IO.Path.GetFileName(System.ReadOnlySpan`1<Char>)

呃……微软已经做了一些事情。

我们在过去几个小时(大约 10:00 GMT)开始的所有构建都因“构建解决方案步骤”而失败,因为以下错误(来自日志):

##[error]EXEC(0,0): Error : Error occurred during processing of input file 'XXX.XXX.dll' --> Method not found: 'System.ReadOnlySpan1 Microsoft.IO.Path.GetFileName(系统.ReadOnlySpan1<Char>)'.

在此输入图像描述

有人对此有什么想法吗?我们的代码库中没有任何变化。

如果您需要更多信息,请告诉我。谢谢

azure-devops

2
推荐指数
1
解决办法
2264
查看次数