Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Puts the contents for the generated file into an in-memory TextBuffer and registers it in the running document table (RDT) with an RDT_ReadLock. This holds the file open in memory until the project is closed (when the project calls IVsMSBuildHostObject::Close).
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.9.0 (in Microsoft.VisualStudio.Shell.Interop.9.0.dll)
Syntax
'Declaration
Public Overridable Function PutGeneratedFileContents ( _
wszFilename As String, _
wszFileContents As String _
) As Integer
public virtual int PutGeneratedFileContents(
string wszFilename,
string wszFileContents
)
public:
virtual int PutGeneratedFileContents(
[InAttribute] String^ wszFilename,
[InAttribute] String^ wszFileContents
)
abstract PutGeneratedFileContents :
wszFilename:string *
wszFileContents:string -> int
override PutGeneratedFileContents :
wszFilename:string *
wszFileContents:string -> int
public function PutGeneratedFileContents(
wszFilename : String,
wszFileContents : String
) : int
Parameters
wszFilename
Type: String[in] The filename of the file from which to obtain generated contents.
wszFileContents
Type: String[out] The generated contents retrieved from the specified file.
Return Value
Type: Int32
Returns S_OK if the method is successful; otherwise, returns E_FAIL if the document is in the RDT and something else has a lock on it which cannot be removed automatically.
Implements
IVsMSBuildTaskFileManager.PutGeneratedFileContents(String, String)
Remarks
If this is an actual build operation (UICONTEXT_SolutionBuilding is on), then the file contents will also be saved to disk. If this is a design-time-only generation for IntelliSense purposes, then the file contents are only put into memory and the disk is not modified. The in-memory TextBuffer is always marked as clean so the user will not be prompted to save the generated file.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.