最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Warning NETSDK1198: A publish profile was not found in the project. In Azure Functions solution - Stack Overflow

programmeradmin2浏览0评论

I get the following warning at build time

Warning NETSDK1198: A publish profile with the name 'SBDPhotosFunctionsIsolated20250118114609 - Zip Deploy1' was not found in the project. Set the PublishProfile property to a valid file name.

My project file starts as

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <PublishProfile>SBDPhotosFunctionsIsolated20250118114609 - Zip Deploy1.pubxml</PublishProfile>
    <AzureFunctionsVersion>v4</AzureFunctionsVersion>
    <OutputType>Exe</OutputType>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

I have also tried

Properties/PublishProfiles/SBDPhotosFunctionsIsolated20250118114609 - Zip Deploy1.pubxml

I was expecting the build error to go away.

I have also tried deleting the obj and bin folders, cleaning, rebuilding, exiting visual studio (VS22)

I get the following warning at build time

Warning NETSDK1198: A publish profile with the name 'SBDPhotosFunctionsIsolated20250118114609 - Zip Deploy1' was not found in the project. Set the PublishProfile property to a valid file name.

My project file starts as

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <PublishProfile>SBDPhotosFunctionsIsolated20250118114609 - Zip Deploy1.pubxml</PublishProfile>
    <AzureFunctionsVersion>v4</AzureFunctionsVersion>
    <OutputType>Exe</OutputType>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

I have also tried

Properties/PublishProfiles/SBDPhotosFunctionsIsolated20250118114609 - Zip Deploy1.pubxml

I was expecting the build error to go away.

I have also tried deleting the obj and bin folders, cleaning, rebuilding, exiting visual studio (VS22)

Share Improve this question asked Jan 18 at 18:30 KirstenKirsten 18k50 gold badges206 silver badges358 bronze badges 1
  • Ensure the <PublishProfile> path in your .csproj is set to Properties\PublishProfiles\YourProfileName.pubxml and confirm the file exists. – Dasari Kamali Commented Jan 20 at 3:33
Add a comment  | 

1 Answer 1

Reset to default 0

Warning NETSDK1198: A publish profile with the name 'SBDPhotosFunctionsIsolated20250118114609 - Zip Deploy1' was not found in the project. Set the PublishProfile property to a valid file name.

The error you are encountering is due to an incorrect publish profile path in the .csproj file. Check if the file is present under \Properties\PublishProfiles.

  • Make sure you add the below line in the .csproj.
<PublishProfile>\Properties\PublishProfiles\kamnetfun - Zip Deploy.pubxml</PublishProfile>

.csproj :

<PropertyGroup>
   <TargetFramework>net8.0</TargetFramework>
    <AzureFunctionsVersion>v4</AzureFunctionsVersion>
    <OutputType>Exe</OutputType>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <PublishProfile>\Properties\PublishProfiles\kamnetfun - Zip Deploy.pubxml</PublishProfile>
  </PropertyGroup>
  • The old publish profile might have been corrupted, incomplete, or outdated. Reset your current publish profile, download the latest one and redeploy it.

I have successfully deployed a sample function to the Azure Function App via publish profile.

发布评论

评论列表(0)

  1. 暂无评论