You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to follow the instructions outlined here using the OData Connected Service 2022+ version of the extension in Visual Studio 2022 Enterprise with T4 files enabled.
Whenever I run the custom tool on the generated tt file, I receive the following error:
An exception was thrown while trying to compile the transformation code. The following Exception was thrown:
System.IO.FileNotFoundException: Could not find file 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Microsoft.OData.ConnectedService.dll'.
File name: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Microsoft.OData.ConnectedService.dll'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Roslyn.Utilities.StandardFileSystem.OpenFile(String filePath, FileMode mode, FileAccess access, FileShare share)
at Roslyn.Utilities.CommonCompilerFileSystemExtensions.OpenFileWithNormalizedException(ICommonCompilerFileSystem fileSystem, String filePath, FileMode fileMode, FileAccess fileAccess, FileShare fileShare)
at Microsoft.VisualStudio.TextTemplating.CompilerBridge.<>c.<.ctor>b__15_0(String x)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Enumerable.<UnionIterator>d__67`1.MoveNext()
at System.Linq.Enumerable.<UnionIterator>d__67`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
at Microsoft.CodeAnalysis.Compilation.ValidateReferences[T](IEnumerable`1 references)
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.WithReferences(IEnumerable`1 references)
at Microsoft.VisualStudio.TextTemplating.CompilerBridge.PrepareNewCompilation()
at Microsoft.VisualStudio.TextTemplating.CompilerBridge.Compile()
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.Compile(String source, String inputFile, IEnumerable`1 references, Boolean debug, SupportedLanguage language, String compilerOptions)
I've tried this in empty .NET 6-8 console projects and a .NET Standard 2.0 NuGet package project. I've also tried on a few different machines with various version of Visual Studio 2022 installed. All output the same result. Am I missing a package or some dependency that will put Microsoft.OData.ConnectedService.dll on my machine?
Version of the Project affected
OData Connected Service 2022+ v1.1.0
VisualStudio Version v17.10.5 Enterprise
Microsoft.Odata.Client v7.21.3
To Reproduce
Steps to reproduce the behavior:
Open Visual Studio 2022.
Install the OData Connected Service 2022+ extension.
Before clicking Finish in the OData service dialog, click the "Advanced Settings" link on the Settings page. Check "Add code templates". Then click Finish.
See error.
Expected behavior
The tool succeeds in generating the OData Reference class.
Actual behavior
The Reference class file has "ErrorGeneratingOutput" and the above error is displayed in the Error List.
The text was updated successfully, but these errors were encountered:
Any update on this issue?
I'm facing the same problem with generating the client code from the t4 template.
Already tried several things like reinstalling the extension, generate from a clean project, etc..
For now I managed to use a workaround by resolving the absolute path to the dll's.
Describe the bug
I'm trying to follow the instructions outlined here using the OData Connected Service 2022+ version of the extension in Visual Studio 2022 Enterprise with T4 files enabled.
Whenever I run the custom tool on the generated tt file, I receive the following error:
I've tried this in empty .NET 6-8 console projects and a .NET Standard 2.0 NuGet package project. I've also tried on a few different machines with various version of Visual Studio 2022 installed. All output the same result. Am I missing a package or some dependency that will put
Microsoft.OData.ConnectedService.dll
on my machine?Version of the Project affected
OData Connected Service 2022+ v1.1.0
VisualStudio Version v17.10.5 Enterprise
Microsoft.Odata.Client v7.21.3
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The tool succeeds in generating the OData
Reference
class.Actual behavior
The
Reference
class file has "ErrorGeneratingOutput" and the above error is displayed in the Error List.The text was updated successfully, but these errors were encountered: