小编Dev*_*ael的帖子

ASP.NET Core 2.0无法加载文件或程序集System.ServiceModel

我正在努力移植一个".NET核心Web应用程序",该应用程序在.NET Framework 4.6.1(即完整框架)下编译,以编译.NET Core 2.0.我有一些仍然需要完整框架的依赖项,但使用.NET 2.0,我的理解是我现在可以从.NET Core 2.0编译的应用程序中引用完整的框架程序集.

当我尝试运行该项目时,我收到以下错误:

无法加载文件或程序集'System.ServiceModel,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'.该系统找不到指定的文件.

我浏览了所有我引用的NuGet包和项目,但没有一个引用System.ServiceModel.Web,但我不相信它与System.ServiceModel相同.当我打开位于bin文件夹中的projectname.deps.json文件时,我看到对System.ServiceModel.Web的引用,但是在"Microsoft.NETCore.App/2.0.0"部分下没有对System.ServiceModel的引用,该部分包含以下行:"ref/netcoreapp2.0/System.ServiceModel.Web.dll":{},

我还在"C:\ Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0"文件夹中查看,我看到一个System.ServiceModel.Web.dll.

我没有做任何WCF工作,正如我所说,我已经查看了我正在使用的库的所有依赖项,但它们似乎都没有引用System.ServiceModel.

还有其他人遇到过这个问题吗?我很欣赏任何人可能拥有的任何见解.

asp.net-core

17
推荐指数
2
解决办法
4283
查看次数

.NET MAUI 中的 Android 深度链接(意图)支持

我目前正在尝试向使用 .NET MAUI 编写的 Android 应用程序添加深度链接支持(通过 Intents)。

我在 AndroidManifest.xml 的application元素下添加了一个活动XML 元素:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true">
      <activity android:name="TestApp.MainActivity" android:exported="true">
        <intent-filter>
          <action android:name="android.intent.action.VIEW" />
          <category android:name="android.intent.category.DEFAULT" />
          <category android:name="android.intent.category.BROWSABLE" />
          <data android:scheme="https"
                android:host="test"
                android:pathPrefix="/group" />
        </intent-filter>
      </activity>
    </application>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
</manifest>
Run Code Online (Sandbox Code Playgroud)

我还在Platforms\Android 下的 MainActivity.cs 中添加了一个IntentFilter (见下文):

[IntentFilter(new[] { Intent.ActionView },
    Categories = new[]
    {
        Intent.ActionView,
        Intent.CategoryDefault,
        Intent.CategoryBrowsable
    },
    DataScheme = "https", DataHost = "test", DataPathPrefix = "/group" …
Run Code Online (Sandbox Code Playgroud)

.net android maui

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

标签 统计

.net ×1

android ×1

asp.net-core ×1

maui ×1