Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remove tralling backslash from $(ProjectDir)?

I have a command line like this in my post-build event:

aspnet_regiis -pef connectionStrings "$(ProjectDir)" -prov "DataProtectionConfigurationProvider"

But aspnet_regiis is returning a failure because the tralling \ in the directory. Pass full name, path + web.config doesn't work either.

How can I solve this?

like image 639
Jack Avatar asked May 02 '16 04:05

Jack


1 Answers

You can use the TrimEnd function to trim the trailing slash character

$(ProjectDir.TrimEnd('\'))

I found this option in this post

like image 164
Thangadurai Avatar answered Nov 17 '22 21:11

Thangadurai