Skip to content

Commit

Permalink
No longer crash on entries created as children of files
Browse files Browse the repository at this point in the history
Fixes #54
  • Loading branch information
madskristensen committed Sep 25, 2020
1 parent 7e24f6d commit 0474e14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AddAnyFilePackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ private async void ExecuteAsync(object sender, EventArgs e)

if (!file.Exists)
{
int position = await WriteFileAsync(project, file.FullName);

try
{
int position = await WriteFileAsync(project, file.FullName);
ProjectItem projectItem = null;

if (item is ProjectItem projItem)
{
if ("{6BB5F8F0-4483-11D3-8BCF-00C04F8EC28C}" == projItem.Kind) // Constants.vsProjectItemKindVirtualFolder
Expand Down

0 comments on commit 0474e14

Please sign in to comment.