Anyone having a solution for “Microsoft Visual Studio” throwing “The operation could not be completed” when including a file in a PowerShell project?
Posted by jpluimers on 2017/06/22
I’ve got a bunch of PowerShell projects in a solution. In some of them, I can include new files, in others I get the below error.
The diff of a good/bad project is below as well.
Two questions:
- Does anybody know how to work around this?
- Does anybody know how to find the actual error for this?
---------------------------
Microsoft Visual Studio
---------------------------
The operation could not be completed
---------------------------
OK
---------------------------
Good file: WindowsLogsCbsInquiry.pssproj
Bad file: WindowsTempInquiry.pssproj
–jeroen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| <PropertyGroup> | |
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
| <SchemaVersion>2.0</SchemaVersion> | |
| <ProjectGuid>{4d9f67aa-d1c2-4a86-854b-daee5826b7ac}</ProjectGuid> | |
| <OutputType>Exe</OutputType> | |
| <RootNamespace>MyApplication</RootNamespace> | |
| <AssemblyName>MyApplication</AssemblyName> | |
| <Name>WindowsLogsCbsInquiry</Name> | |
| </PropertyGroup> | |
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |
| <DebugSymbols>true</DebugSymbols> | |
| <DebugType>full</DebugType> | |
| <Optimize>false</Optimize> | |
| <OutputPath>bin\Debug\</OutputPath> | |
| <DefineConstants>DEBUG;TRACE</DefineConstants> | |
| <ErrorReport>prompt</ErrorReport> | |
| <WarningLevel>4</WarningLevel> | |
| </PropertyGroup> | |
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |
| <DebugType>pdbonly</DebugType> | |
| <Optimize>true</Optimize> | |
| <OutputPath>bin\Release\</OutputPath> | |
| <DefineConstants>TRACE</DefineConstants> | |
| <ErrorReport>prompt</ErrorReport> | |
| <WarningLevel>4</WarningLevel> | |
| </PropertyGroup> | |
| <ItemGroup> | |
| <Folder Include="zabbix.agentd.conf.d\" /> | |
| </ItemGroup> | |
| <ItemGroup> | |
| <Compile Include="WindowsLogsCbsInquiry.ps1" /> | |
| </ItemGroup> | |
| <ItemGroup> | |
| <Content Include="zabbix.agentd.conf.d\WindowsLogsCbsInquiry.conf" /> | |
| </ItemGroup> | |
| <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | |
| <Target Name="Build" /> | |
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| <PropertyGroup> | |
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
| <SchemaVersion>2.0</SchemaVersion> | |
| <ProjectGuid>{b9ca3d9c-15b3-404c-b31e-704d3008bcae}</ProjectGuid> | |
| <OutputType>Exe</OutputType> | |
| <RootNamespace>MyApplication</RootNamespace> | |
| <AssemblyName>MyApplication</AssemblyName> | |
| <Name>WindowsTempInquiry</Name> | |
| </PropertyGroup> | |
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |
| <DebugSymbols>true</DebugSymbols> | |
| <DebugType>full</DebugType> | |
| <Optimize>false</Optimize> | |
| <OutputPath>bin\Debug\</OutputPath> | |
| <DefineConstants>DEBUG;TRACE</DefineConstants> | |
| <ErrorReport>prompt</ErrorReport> | |
| <WarningLevel>4</WarningLevel> | |
| </PropertyGroup> | |
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |
| <DebugType>pdbonly</DebugType> | |
| <Optimize>true</Optimize> | |
| <OutputPath>bin\Release\</OutputPath> | |
| <DefineConstants>TRACE</DefineConstants> | |
| <ErrorReport>prompt</ErrorReport> | |
| <WarningLevel>4</WarningLevel> | |
| </PropertyGroup> | |
| <ItemGroup> | |
| <Compile Include="WindowsTempInquiry.ps1" /> | |
| </ItemGroup> | |
| <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | |
| <Target Name="Build" /> | |
| </Project> |








Leave a comment