我尝试通过WPF应用程序连接到SharePoint Online实例.我发现这篇文章描述了一个可能的解决方案,但问题是特定实例前面有一个Active Directory联合身份验证服务(ADFS),我不知道如何获取auth-token.(我无法为我的应用程序创建证书以对adfs进行身份验证.)
任何已经完成此操作的人都可以通过一些代码片段来支持我吗?
我已经在构建.NET Core 应用程序的ARM设备上设置了构建管道。构建管道的最后一步是将编译的 .NET Core 应用程序存储在 docker 映像中。
是否可以将应用程序存储在X86的 .NET Core 运行时映像中?
我希望 .NET Core 应用程序不关心系统架构,只要部署了 .NET 框架。而且那个 docker 不需要启动 X86 镜像来生成新镜像:
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
COPY /my-application/build/ /app/
EXPOSE 80/tcp
WORKDIR /app
ENTRYPOINT ["dotnet", "app.dll"]
Run Code Online (Sandbox Code Playgroud) 我尝试将私有 nuget 源添加(覆盖)到我的构建脚本中,以便添加用户/密码 - 并将其置于我的源代码控制之外。到目前为止我尝试过的:
nuget
未被识别为图像内的命令dotnet nuget
没有添加其他源的命令dotnet restore
FROM mcr.microsoft.com/dotnet/core/sdk:2.2
RUN apt-get update && apt-get install -y nuget
RUN nuget source Add -Name "Private Feed" -Source ".." -UserName "UserVAR" -Password "PassVAR"
RUN dotnet restore
Run Code Online (Sandbox Code Playgroud) 是否可以将文件列表保存到一个MemoryStream中,然后将文件保存回光盘?
我有以下docker-compose
文件,但我不知道如何在 helm 中设置working_dir
和。有人有如何做到这一点的例子吗?entrypoint
deployment.yaml
docker-compose
version: "3.5"
services:
checklist:
image: ...
working_dir: /checklist
entrypoint: ["dotnet", "Checklist.dll"]
...
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用GitHub操作从我的项目中生成NuGet包,并将其推送到(私有)GitHub注册表。
我的脚本([NAME]字段已删除):
name: Update NuGet
on: [push]
jobs:
build:
runs-on: ubuntu-latest
name: Update NuGet
steps:
- uses: actions/checkout@master
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.2.105'
- name: Package Release
run: |
cd [SOLUTION_FOLDER]
dotnet pack -c Release -o out
- name: Publish Nuget to GitHub registry
run: dotnet nuget push ./[SOLUTION_FOLDER]/[PROJECT_FOLDER]/out/$(ls ./[SOLUTION_FOLDER]/[PROJECT_FOLDER]/out) -s https://nuget.pkg.github.com/[USERNAME]/index.json -k ${GITHUB_TOKEN}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Run Code Online (Sandbox Code Playgroud)
日志输出:
info : Pushing [PROJECT_FOLDER].3.4.23.nupkg to 'https://nuget.pkg.github.com/[USERNAME]'...
info : PUT https://nuget.pkg.github.com/[USERNAME]/
info : An error was encountered when fetching 'PUT …
Run Code Online (Sandbox Code Playgroud) 如何以编程方式从c#中使用xmlDataProvider进行databindet的wpf树视图中选择rootnode?
在我的例子中,Rootnode来自DataType ="cards":
<cards>
<category />
<card />
<card />
<card />
</cards>
Run Code Online (Sandbox Code Playgroud)
我试过这个:
//AddNode
xmlDataProvider.Document.DocumentElement["cards"].AppendChild(newNode);
//Select rootnode
treeView.SelectedValuePath = "cards";
//the hard way:
//treeView.SelectedValuePath = ((XmlNode)treeView.Items.GetItemAt(0)).Name.LocalName";
treeView.Focus();
Run Code Online (Sandbox Code Playgroud)
但没有选择Rootnode :-(
我需要一个按钮,它在每次布尔值(IsFavourite)更改时都会更改他的Backgroundimage。我使用DataTrigger进行了尝试,但他不知道该属性:“源”。你能帮我吗,我不喜欢xaml-code :-(
<Style x:Key="starButtonStyle" TargetType="{x:Type Button}">
<Setter Property="IsEnabled" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Image x:Name="PART_img" Source="/FtpUploadClient;component/media/star_off_48.png" Height="28" Width="28" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="PART_img"
Property="Source"
Value="/FtpUploadClient;component/media/star_48.png" />
</Trigger>
<DataTrigger Binding="{Binding Path=IsFavourite}" Value="True">
<Setter Property="Source" Value="/FtpUploadClient;component/media/star_48.png" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=IsFavourite}" Value="False">
<Setter Property="Source" Value="/FtpUploadClient;component/media/star_off_48.png" />
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Run Code Online (Sandbox Code Playgroud)
private void StarButton_Click(object sender, RoutedEventArgs e)
{
IsFavourite = !IsFavourite;
}
private bool isFavourite = false;
public bool IsFavourite
{
get { return isFavourite; }
set …
Run Code Online (Sandbox Code Playgroud) 实际标签显示控件的命名空间,而不是活动tabitem的名称(标题).
..
<Label Content="{x:Type TabControl}" />
</Grid>
<TabControl>
<TabItem Header="Header1" />
<TabItem Header="Header2" />
..
Run Code Online (Sandbox Code Playgroud) c# ×4
docker ×3
wpf ×3
.net-core ×2
nuget ×2
.net ×1
action ×1
adfs ×1
asp.net-core ×1
bash ×1
binding ×1
dockerfile ×1
github ×1
kubernetes ×1
memorystream ×1
multiarch ×1
sharepoint ×1
tabcontrol ×1
tabitem ×1
treeview ×1
xaml ×1
xml ×1